Stefan Dösinger : d3d9: Check textures for srgb writing, not surfaces.

Alexandre Julliard julliard at winehq.org
Thu Apr 24 15:56:36 CDT 2008


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Thu Apr 24 01:00:44 2008 +0200

d3d9: Check textures for srgb writing, not surfaces.

---

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

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 2c224e8..2c3cea4 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -6552,9 +6552,15 @@ static void fog_srgbwrite_test(IDirect3DDevice9 *device)
     DWORD color;
 
     IDirect3DDevice9_GetDirect3D(device, &d3d);
+    /* Ask for srgb writing on D3DRTYPE_TEXTURE. Some Windows drivers do not report it on surfaces.
+     * For some not entirely understood reasons D3DUSAGE_RENDERTARGET | D3DUSAGE_QUERY_SRGBWRITE
+     * passes on surfaces, while asking for SRGBWRITE alone fails. Textures advertize srgb writing
+     * alone as well, so use that since it is not the point of this test to show how CheckDeviceFormat
+     * works
+     */
     if(IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
                                     D3DUSAGE_RENDERTARGET | D3DUSAGE_QUERY_SRGBWRITE,
-                                    D3DRTYPE_SURFACE, D3DFMT_A8R8G8B8) != D3D_OK) {
+                                    D3DRTYPE_TEXTURE, D3DFMT_A8R8G8B8) != D3D_OK) {
         skip("No SRGBWRITEENABLE support on D3DFMT_X8R8G8B8\n");
         IDirect3D9_Release(d3d);
         return;




More information about the wine-cvs mailing list