dlls/wined3d/device.c: IWineD3DDeviceImpl_CreateQuery lost detection of unimplemented query type

Christoph Frick frick at sc-networks.de
Tue Oct 18 03:18:19 CDT 2005


hi list,

as the game Live For Speed refuses to work for me with the 20050930
since i have installed the new nvidia drivers 7something I did lots of
comparing between 20050830 and 20050930 and found that the
swtich-statement for IWineD3DDeviceImpl_CreateQuery is no longer
detecting unimplemented types and won't start complaining about them
(FIXME(...)). Maybe this is intentional therefor this patch to the
developer list because the d3d hackers sure know better than me or at
least can test against recent games.

Before the change the known, but not implemented got a warning - not
they are silently ignored. Therefor i moved the check against
WINED3DQUERYTYPE_OCCLUSION on top (add a warn here, that the opengl
driver does not support the query) and let everything else fall again in
the default: case.

-- 
cu

--- dlls/wined3d/device.c.orig	2005-10-17 21:18:14.000000000 +0200
+++ dlls/wined3d/device.c	2005-10-17 21:22:16.000000000 +0200
@@ -1060,6 +1060,13 @@
         HRESULT hr = D3DERR_NOTAVAILABLE;
         /* Lie and say everything is good (we can return ok fake data from a stub) */
         switch(Type) {
+        case WINED3DQUERYTYPE_OCCLUSION:
+            TRACE("(%p) occlusion query\n", This);
+            if (GL_SUPPORT(ARB_OCCLUSION_QUERY) || GL_SUPPORT(NV_OCCLUSION_QUERY))
+                hr = D3D_OK;
+            else
+                WARN("Not supported: ARB_OCCLUSION_QUERY/NV_OCCLUSION_QUERY\n");
+            break;
         case WINED3DQUERYTYPE_VCACHE:
         case WINED3DQUERYTYPE_RESOURCEMANAGER:
         case WINED3DQUERYTYPE_VERTEXSTATS:
@@ -1073,12 +1080,6 @@
         case WINED3DQUERYTYPE_PIXELTIMINGS:
         case WINED3DQUERYTYPE_BANDWIDTHTIMINGS:
         case WINED3DQUERYTYPE_CACHEUTILIZATION:
-        break;
-        case WINED3DQUERYTYPE_OCCLUSION:
-            TRACE("(%p) occlusion query\n", This);
-            if (GL_SUPPORT(ARB_OCCLUSION_QUERY) || GL_SUPPORT(NV_OCCLUSION_QUERY))
-                hr = D3D_OK;
-        break;
         default:
             FIXME("(%p) Unhandled query type %d\n",This , Type);
         }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20051018/f8024972/attachment-0001.pgp


More information about the wine-devel mailing list