[wined3d] better warn/fixme for query handling

Christoph Frick frick at sc-networks.de
Wed Feb 8 06:29:31 CST 2006


hiho,

this is one of three patches i still have in my cvs-tree that are not
supplied. like the following i tired to submit several times - except
for this one i never got a feedback, whats wrong.

Licence: LGPL
ChangeLog:

2006-02-08  Christoph Frick <rid at zefix.tv>
	- dlls/wined3d/device.c
	more granular handling of errors for queries

-- 
cu

Index: dlls/wined3d/device.c
===================================================================
RCS file: /home/wine/wine/dlls/wined3d/device.c,v
retrieving revision 1.125
diff -u -r1.125 device.c
--- dlls/wined3d/device.c	7 Feb 2006 16:02:51 -0000	1.125
+++ dlls/wined3d/device.c	8 Feb 2006 12:23:00 -0000
@@ -1095,8 +1095,14 @@
     if (NULL == ppQuery) {
         /* Just a check to see if we support this type of query */
         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("Unsupported in local OpenGL implementation: ARB_OCCLUSION_QUERY/NV_OCCLUSION_QUERY\n");
+            break;
         case WINED3DQUERYTYPE_VCACHE:
         case WINED3DQUERYTYPE_RESOURCEMANAGER:
         case WINED3DQUERYTYPE_VERTEXSTATS:
@@ -1110,16 +1116,11 @@
         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;
+            FIXME("(%p) Unsupported query type %d\n", This, Type);
+	    break;
         default:
-            FIXME("(%p) Unhandled query type %d\n",This , Type);
+            FIXME("(%p) Unhandled query type %d\n", This, Type);
         }
-        FIXME("(%p) : Stub request for query type %d returned %ld\n", This, Type, hr);
         return hr;
     }
 
-------------- 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/20060208/b2dd92f1/attachment.pgp


More information about the wine-devel mailing list