resend: [d3d] rearrange switch statement to have FIXMEs for unhalded query types - d3d guru help requested

Christoph Frick frick at sc-networks.de
Wed Dec 7 06:54:44 CST 2005


On Wed, Dec 07, 2005 at 01:10:49PM +0100, Alexandre Julliard wrote:

> > the fixme in the current CVS version is not executed for the unhandled
> > defines (hence the break before default:)
> There's another FIXME just after the switch that's executed in all
> cases.

yeah right - i just checked against my cvs-tree and saw, that this is
still open. the problem here (and some d3d guru might jump in here) is
that i think, that the comment about the lieing and the last fixme is
misleading/wrong?

first of all we no longer lie (only occlusion-query is handled the rest
not). second this is no stub - it works like advertised (ppQuery==NULL
is for checking only). following now a patch that hopefully fixes the
whole thing and give reasonable messages for user/developer.

-- 
cu

Index: dlls/wined3d/device.c
===================================================================
RCS file: /home/wine/wine/dlls/wined3d/device.c,v
retrieving revision 1.103
diff -u -r1.103 device.c
--- dlls/wined3d/device.c	3 Dec 2005 18:34:46 -0000	1.103
+++ dlls/wined3d/device.c	7 Dec 2005 12:48:23 -0000
@@ -1094,8 +1094,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:
@@ -1109,16 +1115,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/20051207/0b49975e/attachment.pgp


More information about the wine-devel mailing list