Villacaleb / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

Can't unmap multi-mip 2D textures properly; I need the calculated subresource number #854

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If you look at line 107 of Texture2D.cpp 
(http://code.google.com/p/slimdx/source/browse/trunk/source/direct3d10/Texture2D
.cpp?spec=svn2080&r=2080) you'll notice that when the user calls Map(), you 
call D3D10CalcSubresource to compute the subresource number given the mip 
level, array slice, etc.

This subresource information is not returned to the user, however, and no 
provision is made for calculating it. The user needs this value in order to 
properly call Unmap().

In order to fix this, either the subresource number should be returned to the 
user, or D3D10CalcSubresource should be exposed so the user can calculate it 
themselves before calling Unmap

Original issue reported on code.google.com by rav...@gmail.com on 9 Dec 2011 at 11:04

GoogleCodeExporter commented 9 years ago
You should find D3D10CalcSubresource exposed in the Resource base class (line 
186):

http://code.google.com/p/slimdx/source/browse/trunk/source/direct3d10/Resource10
.cpp

Original comment by nicholas.woodfield on 14 Dec 2011 at 2:13

GoogleCodeExporter commented 9 years ago
My mistake, sorry.

Original comment by rav...@gmail.com on 14 Dec 2011 at 9:25

GoogleCodeExporter commented 9 years ago
Closing this issue.

Original comment by promit....@gmail.com on 21 Dec 2011 at 9:07