HeavenWu / slimdx

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

Length of DataStream in d3d9 #631

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In Direct3D9::Surface::LockRectangle, the length of the DataStream is 
computed by:

int lockedSize = lockedRect.Pitch * Description.Height;

But for DXT formatted surfaces the pitch is in rows of blocks, not pixels, 
so height should be something like: (height + 3) / 4;

This probably affects volumes as well, but I haven't checked.  I also 
haven't looked at d3d10/11.

Original issue reported on code.google.com by corng...@gmail.com on 8 Mar 2010 at 1:43

GoogleCodeExporter commented 8 years ago
Well this is a pain. Will fix.

Original comment by promit....@gmail.com on 22 Mar 2010 at 10:12

GoogleCodeExporter commented 8 years ago
Adding milestone.

Original comment by Mike.Popoloski on 2 Jun 2010 at 6:34

GoogleCodeExporter commented 8 years ago
Looks like DXT is limited to 2D, so Volume is fine. Am ignoring this in 10/11 
for the time being.

Original comment by promit....@gmail.com on 22 Jun 2010 at 8:58

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1611.

Original comment by promit....@gmail.com on 22 Jun 2010 at 9:12