edgar-mtz-e / slimdx

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

D3D9 Volume Tex bytes in box computed incorrectly #281

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Checked out June 16 and observed this when locking 512x512xN size tex. 
This may only be noticed for large size textures because the result had 
wrapped to a negative value.

In both VolumeTexture::LockBox functions:

ORIGINAL:
int lockedSize = lockedBox.RowPitch * lockedBox.SlicePitch * 
GetLevelDescription( level ).Height;

FIXED:
int lockedSize = lockedBox.SlicePitch * GetLevelDescription( level ).Depth;

- Ben C.

Original issue reported on code.google.com by benc...@gmail.com on 16 Jun 2008 at 9:44

GoogleCodeExporter commented 9 years ago
Ouch, that's a bad one. Fixed.

Original comment by promit....@gmail.com on 16 Jun 2008 at 10:13