From: Yuxuan Shui yshui@codeweavers.com
This test seems to be testing different filters when creating volumes, and nothing indicates it's intentionally testing volume creation from out-of-bound srcboxes.
The pixels array is 16x4 bytes, pixel format D3DFMT_A8R8G8B8 is 4 bpp, so pixels have 16 pixels in total. The boxes have 2 slices, with a slice pitch of 32 bytes, that's 8 pixel/slice. The original width*height is 6*6 which is thus beyond these bounds. This commit changed it to 4*2 so the rowpitch of 16 bytes is perserved. --- dlls/d3dx9_36/tests/volume.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/tests/volume.c b/dlls/d3dx9_36/tests/volume.c index b090e31a8b1..4acebe1a181 100644 --- a/dlls/d3dx9_36/tests/volume.c +++ b/dlls/d3dx9_36/tests/volume.c @@ -193,8 +193,8 @@ static void test_D3DXLoadVolumeFromMemory(IDirect3DDevice9 *device)
IDirect3DVolumeTexture9_GetVolumeLevel(volume_texture, 0, &volume);
- set_box(&src_box, 1, 1, 7, 7, 0, 1); - set_box(&dst_box, 1, 1, 7, 7, 0, 1); + set_box(&src_box, 1, 1, 5, 3, 0, 1); + set_box(&dst_box, 1, 1, 5, 3, 0, 1); hr = D3DXLoadVolumeFromMemory(volume, NULL, &dst_box, pixels, D3DFMT_A8R8G8B8, 16, 32, NULL, &src_box, D3DX_DEFAULT, 0); ok(hr == D3D_OK, "D3DXLoadVolumeFromMemory returned %#lx, expected %#lx\n", hr, D3D_OK);