H. Verbeet : d3d9: Release pixel shaders after we' re done with them in the visual test.

Alexandre Julliard julliard at winehq.org
Wed Oct 10 15:27:23 CDT 2007


Module: wine
Branch: master
Commit: 3587dfeb48ec0b88efb825dc614a550a66c86716
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3587dfeb48ec0b88efb825dc614a550a66c86716

Author: H. Verbeet <hverbeet at gmail.com>
Date:   Wed Oct 10 18:35:54 2007 +0200

d3d9: Release pixel shaders after we're done with them in the visual test.

---

 dlls/d3d9/tests/visual.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index b376e9d..5ebd061 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -2567,8 +2567,11 @@ static void texdepth_test(IDirect3DDevice9 *device)
     color = getPixelColor(device, 638, 240);
     ok(color == 0x000000ff, "Pixel 638(100%% + 2 pixel) has color %08x, expected 0x000000ff\n", color);
 
+    /* Cleanup */
     hr = IDirect3DDevice9_SetPixelShader(device, NULL);
     ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed (%08x)\n", hr);
+    IDirect3DPixelShader9_Release(shader);
+
     hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_FALSE);
     ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %s\n", DXGetErrorString9(hr));
     hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, TRUE);
@@ -2722,6 +2725,11 @@ static void texkill_test(IDirect3DDevice9 *device)
     ok(color == 0x00ffff00, "Pixel 578/49 has color %08x, expected 0x00ffff00\n", color);
     color = getPixelColor(device, 575, 430);
     ok(color == 0x000000ff, "Pixel 575/49 has color %08x, expected 0x000000ff\n", color);
+
+    /* Cleanup */
+    hr = IDirect3DDevice9_SetPixelShader(device, NULL);
+    ok(SUCCEEDED(hr), "SetPixelShader failed (%08x)\n", hr);
+    IDirect3DPixelShader9_Release(shader);
 }
 
 static void x8l8v8u8_test(IDirect3DDevice9 *device)




More information about the wine-cvs mailing list