cvs diff: Diffing . Index: device.c =================================================================== RCS file: /home/wine/wine/dlls/wined3d/device.c,v retrieving revision 1.89 diff -u -r1.89 device.c --- device.c 29 Sep 2005 10:47:59 -0000 1.89 +++ device.c 24 Oct 2005 20:05:58 -0000 @@ -1054,12 +1054,19 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINED3DQUERYTYPE Type, IWineD3DQuery **ppQuery, IUnknown* parent) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DQueryImpl *object; /*NOTE: impl ref allowed since this is a create function */ + HRESULT hr = D3DERR_NOTAVAILABLE; 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("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); } @@ -1094,6 +1095,7 @@ if(GL_SUPPORT(ARB_OCCLUSION_QUERY) || GL_SUPPORT(NV_OCCLUSION_QUERY)) { TRACE("(%p) Allocating data for an occlusion query\n", This); object->extendedData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WineQueryOcclusionData)); + hr = D3D_OK; break; } case D3DQUERYTYPE_VCACHE: @@ -1114,7 +1116,7 @@ FIXME("(%p) Unhandled query type %d\n",This , Type); } TRACE("(%p) : Created Query %p\n", This, object); - return D3D_OK; + return hr; } /* example at http://www.fairyengine.com/articles/dxmultiviews.htm */