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; }
pgpDDHdip1xnk.pgp
Description: PGP signature