From 71d43e2c528b53f079022a7f08ad47f4c149bf7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Sat, 3 Jul 2010 11:54:42 +0200 Subject: [PATCH 03/14] 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 0d9d666..0063acc 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); -- 1.6.4.4