|
I'm using SlimDX with Direct3D 10.1 and I created a 2D 32x32 texture of format A8_UNorm set up for usage as a shader resource and flagged for write access. When I map the texture to get at a stream to write into it (using WriteDiscard and mip level 0), the stream's stated Length is 2048 bytes long which doesn't make any sense to me (assuming that the 8 in A8_UNorm means 8 bits, 32 * 32 * 1 = 1024). The DataRectangle that I get from the mapping says that the pitch is 64 as well. It does the same thing if I use R8_UNorm. R32_Float says 4 bytes per texel, which is correct. Any idea why the stream seems to be twice as long as it should be when I'm using one of the *8_UNorm formats? I'm relatively new to SlimDX (and D3D in general) so perhaps I've made some bad decisions here. code:
code:
|
# ¿ Dec 15, 2011 00:30 |
|
|
# ¿ Apr 26, 2024 01:06 |
|
I tried the identical code on my ATI card at home as opposed to my Quadro at work, and it returns a stream of the proper size and pitch. I'm really confused, so I'm just using R32_Float for now. Thanks anyway
|
# ¿ Dec 17, 2011 04:27 |