Module: wine Branch: master Commit: 218b9cec6fc0f7c3e417d82f62608ffcf3bbf37a URL: http://source.winehq.org/git/wine.git/?a=commit;h=218b9cec6fc0f7c3e417d82f62...
Author: Stefan Dösinger stefan@codeweavers.com Date: Sat Jul 3 11:54:42 2010 +0200
d3d9: Nvidia drivers don't like unused output formats.
Newer nvidia drivers return garbage when using a COUNTx where x is bigger than the amount of coordinates the texture can consume. So stick to COUNT3 for volume textures. The tests don't need COUNT4 anyway.
---
dlls/d3d9/tests/visual.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 1da7cca..b3d1103 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -3937,10 +3937,10 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr);
- /* default values? Set up the identity matrix, pass in 2 vertex coords, and enable 4 */ + /* default values? Set up the identity matrix, pass in 2 vertex coords, and enable 3 */ hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) identity); ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); - IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT4); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT3); ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); @@ -4013,10 +4013,14 @@ static void texture_transform_flags_test(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %08x\n", hr);
/* Default values? 4 coords used, 3 passed. What happens to the 4th? + * Use COUNT3 because newer Nvidia drivers return black when there are more (output) coords + * than being used by the texture(volume tex -> 3). Again, as shown in earlier test the COUNTx + * affects the post-transformation output, so COUNT3 plus the matrix above is OK for testing the + * 4th *input* coordinate. */ hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) mat); ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %08x\n", hr); - IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT4); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT3); ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 6 * sizeof(float)); ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr);