2 * IWineD3DQuery implementation
4 * Copyright 2005 Oliver Stieber
5 * Copyright 2007-2008 Stefan Dösinger for CodeWeavers
6 * Copyright 2009 Henri Verbeet for CodeWeavers.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #include "wined3d_private.h"
29 * http://www.gris.uni-tuebingen.de/~bartz/Publications/paper/hww98.pdf
30 * http://oss.sgi.com/projects/ogl-sample/registry/ARB/occlusion_query.txt
33 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
34 #define GLINFO_LOCATION This->wineD3DDevice->adapter->gl_info
36 /* *******************************************
37 IWineD3DQuery IUnknown parts follow
38 ******************************************* */
39 static HRESULT WINAPI IWineD3DQueryImpl_QueryInterface(IWineD3DQuery *iface, REFIID riid, LPVOID *ppobj)
41 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
42 TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
43 if (IsEqualGUID(riid, &IID_IUnknown)
44 || IsEqualGUID(riid, &IID_IWineD3DBase)
45 || IsEqualGUID(riid, &IID_IWineD3DQuery)) {
46 IUnknown_AddRef(iface);
54 static ULONG WINAPI IWineD3DQueryImpl_AddRef(IWineD3DQuery *iface) {
55 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
56 TRACE("(%p) : AddRef increasing from %d\n", This, This->ref);
57 return InterlockedIncrement(&This->ref);
60 static ULONG WINAPI IWineD3DQueryImpl_Release(IWineD3DQuery *iface) {
61 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
63 TRACE("(%p) : Releasing from %d\n", This, This->ref);
64 ref = InterlockedDecrement(&This->ref);
66 /* Queries are specific to the GL context that created them. Not
67 * deleting the query will obviously leak it, but that's still better
68 * than potentially deleting a different query with the same id in this
69 * context, and (still) leaking the actual query. */
70 if (This->type == WINED3DQUERYTYPE_EVENT)
72 struct wined3d_event_query *query = This->extendedData;
74 if (query->context) context_free_event_query(query);
76 else if (This->type == WINED3DQUERYTYPE_OCCLUSION)
78 struct wined3d_occlusion_query *query = This->extendedData;
80 if (query->context) context_free_occlusion_query(query);
83 HeapFree(GetProcessHeap(), 0, This->extendedData);
84 HeapFree(GetProcessHeap(), 0, This);
89 /* *******************************************
90 IWineD3DQuery IWineD3DQuery parts follow
91 ******************************************* */
92 static HRESULT WINAPI IWineD3DQueryImpl_GetParent(IWineD3DQuery *iface, IUnknown** parent){
93 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
95 *parent= (IUnknown*) parent;
96 IUnknown_AddRef(*parent);
97 TRACE("(%p) : returning %p\n", This, *parent);
101 static HRESULT WINAPI IWineD3DQueryImpl_GetDevice(IWineD3DQuery* iface, IWineD3DDevice **pDevice){
102 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
103 IWineD3DDevice_AddRef((IWineD3DDevice *)This->wineD3DDevice);
104 *pDevice = (IWineD3DDevice *)This->wineD3DDevice;
105 TRACE("(%p) returning %p\n", This, *pDevice);
110 static HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags){
111 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
114 TRACE("(%p) : type %#x, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, This->type, pData, dwSize, dwGetDataFlags);
118 case WINED3DQUERYTYPE_VCACHE:
121 WINED3DDEVINFO_VCACHE *data = pData;
122 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_VCACHE\n", This);
123 if(pData == NULL || dwSize == 0) break;
124 data->Pattern = WINEMAKEFOURCC('C','A','C','H');
125 data->OptMethod = 0; /*0 get longest strips, 1 optimize vertex cache*/
126 data->CacheSize = 0; /*cache size, only required if OptMethod == 1*/
127 data->MagicNumber = 0; /*only required if OptMethod == 1 (used internally)*/
131 case WINED3DQUERYTYPE_RESOURCEMANAGER:
133 WINED3DDEVINFO_RESOURCEMANAGER *data = pData;
135 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_RESOURCEMANAGER\n", This);
136 if(pData == NULL || dwSize == 0) break;
137 for(i = 0; i < WINED3DRTYPECOUNT; i++){
138 /*I'm setting the default values to 1 so as to reduce the risk of a div/0 in the caller*/
139 /* isTextureResident could be used to get some of this information */
140 data->stats[i].bThrashing = FALSE;
141 data->stats[i].ApproxBytesDownloaded = 1;
142 data->stats[i].NumEvicts = 1;
143 data->stats[i].NumVidCreates = 1;
144 data->stats[i].LastPri = 1;
145 data->stats[i].NumUsed = 1;
146 data->stats[i].NumUsedInVidMem = 1;
147 data->stats[i].WorkingSet = 1;
148 data->stats[i].WorkingSetBytes = 1;
149 data->stats[i].TotalManaged = 1;
150 data->stats[i].TotalBytes = 1;
155 case WINED3DQUERYTYPE_VERTEXSTATS:
157 WINED3DDEVINFO_VERTEXSTATS *data = pData;
158 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_VERTEXSTATS\n", This);
159 if(pData == NULL || dwSize == 0) break;
160 data->NumRenderedTriangles = 1;
161 data->NumExtraClippingTriangles = 1;
165 case WINED3DQUERYTYPE_TIMESTAMP:
167 UINT64* data = pData;
168 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_TIMESTAMP\n", This);
169 if(pData == NULL || dwSize == 0) break;
170 *data = 1; /*Don't know what this is supposed to be*/
173 case WINED3DQUERYTYPE_TIMESTAMPDISJOINT:
176 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_TIMESTAMPDISJOINT\n", This);
177 if(pData == NULL || dwSize == 0) break;
178 *data = FALSE; /*Don't know what this is supposed to be*/
181 case WINED3DQUERYTYPE_TIMESTAMPFREQ:
183 UINT64* data = pData;
184 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_TIMESTAMPFREQ\n", This);
185 if(pData == NULL || dwSize == 0) break;
186 *data = 1; /*Don't know what this is supposed to be*/
189 case WINED3DQUERYTYPE_PIPELINETIMINGS:
191 WINED3DDEVINFO_PIPELINETIMINGS *data = pData;
192 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_PIPELINETIMINGS\n", This);
193 if(pData == NULL || dwSize == 0) break;
195 data->VertexProcessingTimePercent = 1.0f;
196 data->PixelProcessingTimePercent = 1.0f;
197 data->OtherGPUProcessingTimePercent = 97.0f;
198 data->GPUIdleTimePercent = 1.0f;
201 case WINED3DQUERYTYPE_INTERFACETIMINGS:
203 WINED3DDEVINFO_INTERFACETIMINGS *data = pData;
204 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_INTERFACETIMINGS\n", This);
206 if(pData == NULL || dwSize == 0) break;
207 data->WaitingForGPUToUseApplicationResourceTimePercent = 1.0f;
208 data->WaitingForGPUToAcceptMoreCommandsTimePercent = 1.0f;
209 data->WaitingForGPUToStayWithinLatencyTimePercent = 1.0f;
210 data->WaitingForGPUExclusiveResourceTimePercent = 1.0f;
211 data->WaitingForGPUOtherTimePercent = 96.0f;
215 case WINED3DQUERYTYPE_VERTEXTIMINGS:
217 WINED3DDEVINFO_STAGETIMINGS *data = pData;
218 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_VERTEXTIMINGS\n", This);
220 if(pData == NULL || dwSize == 0) break;
221 data->MemoryProcessingPercent = 50.0f;
222 data->ComputationProcessingPercent = 50.0f;
226 case WINED3DQUERYTYPE_PIXELTIMINGS:
228 WINED3DDEVINFO_STAGETIMINGS *data = pData;
229 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_PIXELTIMINGS\n", This);
231 if(pData == NULL || dwSize == 0) break;
232 data->MemoryProcessingPercent = 50.0f;
233 data->ComputationProcessingPercent = 50.0f;
236 case WINED3DQUERYTYPE_BANDWIDTHTIMINGS:
238 WINED3DDEVINFO_BANDWIDTHTIMINGS *data = pData;
239 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_BANDWIDTHTIMINGS\n", This);
241 if(pData == NULL || dwSize == 0) break;
242 data->MaxBandwidthUtilized = 1.0f;
243 data->FrontEndUploadMemoryUtilizedPercent = 1.0f;
244 data->VertexRateUtilizedPercent = 1.0f;
245 data->TriangleSetupRateUtilizedPercent = 1.0f;
246 data->FillRateUtilizedPercent = 97.0f;
249 case WINED3DQUERYTYPE_CACHEUTILIZATION:
251 WINED3DDEVINFO_CACHEUTILIZATION *data = pData;
252 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_CACHEUTILIZATION\n", This);
254 if(pData == NULL || dwSize == 0) break;
255 data->TextureCacheHitRate = 1.0f;
256 data->PostTransformVertexCacheHitRate = 1.0f;
262 FIXME("(%p) Unhandled query type %d\n",This , This->type);
266 /*dwGetDataFlags = 0 || D3DGETDATA_FLUSH
267 D3DGETDATA_FLUSH may return WINED3DERR_DEVICELOST if the device is lost
269 return res; /* S_OK if the query data is available*/
272 static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) {
273 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface;
274 struct wined3d_occlusion_query *query = This->extendedData;
275 IWineD3DDeviceImpl *device = This->wineD3DDevice;
276 const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
277 struct wined3d_context *context;
283 TRACE("(%p) : type D3DQUERY_OCCLUSION, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags);
285 if (!query->context) This->state = QUERY_CREATED;
287 if (This->state == QUERY_CREATED)
289 /* D3D allows GetData on a new query, OpenGL doesn't. So just invent the data ourselves */
290 TRACE("Query wasn't yet started, returning S_OK\n");
295 if (This->state == QUERY_BUILDING)
297 /* Msdn says this returns an error, but our tests show that S_FALSE is returned */
298 TRACE("Query is building, returning S_FALSE\n");
302 if (!gl_info->supported[ARB_OCCLUSION_QUERY])
304 WARN("(%p) : Occlusion queries not supported. Returning 1.\n", This);
309 if (query->context->tid != GetCurrentThreadId())
311 FIXME("%p Wrong thread, returning 1.\n", This);
316 context = context_acquire(This->wineD3DDevice, query->context->current_rt, CTXUSAGE_RESOURCELOAD);
320 GL_EXTCALL(glGetQueryObjectuivARB(query->id, GL_QUERY_RESULT_AVAILABLE_ARB, &available));
321 checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT_AVAILABLE)");
322 TRACE("(%p) : available %d.\n", This, available);
328 GL_EXTCALL(glGetQueryObjectuivARB(query->id, GL_QUERY_RESULT_ARB, &samples));
329 checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT)");
330 TRACE("(%p) : Returning %d samples.\n", This, samples);
342 context_release(context);
347 static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) {
348 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface;
349 struct wined3d_event_query *query = This->extendedData;
350 struct wined3d_context *context;
353 TRACE("(%p) : type D3DQUERY_EVENT, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags);
355 if (!pData || !dwSize) return S_OK;
359 ERR("Query not started, returning TRUE.\n");
365 if (query->context->tid != GetCurrentThreadId())
367 /* See comment in IWineD3DQuery::Issue, event query codeblock */
368 FIXME("Wrong thread, reporting GPU idle.\n");
374 context = context_acquire(This->wineD3DDevice, query->context->current_rt, CTXUSAGE_RESOURCELOAD);
378 if (context->gl_info->supported[APPLE_FENCE])
380 *data = GL_EXTCALL(glTestFenceAPPLE(query->id));
381 checkGLcall("glTestFenceAPPLE");
383 else if (context->gl_info->supported[NV_FENCE])
385 *data = GL_EXTCALL(glTestFenceNV(query->id));
386 checkGLcall("glTestFenceNV");
390 WARN("(%p): reporting GPU idle\n", This);
396 context_release(context);
401 static DWORD WINAPI IWineD3DQueryImpl_GetDataSize(IWineD3DQuery* iface){
402 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
404 TRACE("(%p) : type %#x\n", This, This->type);
406 case WINED3DQUERYTYPE_VCACHE:
407 dataSize = sizeof(WINED3DDEVINFO_VCACHE);
409 case WINED3DQUERYTYPE_RESOURCEMANAGER:
410 dataSize = sizeof(WINED3DDEVINFO_RESOURCEMANAGER);
412 case WINED3DQUERYTYPE_VERTEXSTATS:
413 dataSize = sizeof(WINED3DDEVINFO_VERTEXSTATS);
415 case WINED3DQUERYTYPE_EVENT:
416 dataSize = sizeof(BOOL);
418 case WINED3DQUERYTYPE_TIMESTAMP:
419 dataSize = sizeof(UINT64);
421 case WINED3DQUERYTYPE_TIMESTAMPDISJOINT:
422 dataSize = sizeof(BOOL);
424 case WINED3DQUERYTYPE_TIMESTAMPFREQ:
425 dataSize = sizeof(UINT64);
427 case WINED3DQUERYTYPE_PIPELINETIMINGS:
428 dataSize = sizeof(WINED3DDEVINFO_PIPELINETIMINGS);
430 case WINED3DQUERYTYPE_INTERFACETIMINGS:
431 dataSize = sizeof(WINED3DDEVINFO_INTERFACETIMINGS);
433 case WINED3DQUERYTYPE_VERTEXTIMINGS:
434 dataSize = sizeof(WINED3DDEVINFO_STAGETIMINGS);
436 case WINED3DQUERYTYPE_PIXELTIMINGS:
437 dataSize = sizeof(WINED3DDEVINFO_STAGETIMINGS);
439 case WINED3DQUERYTYPE_BANDWIDTHTIMINGS:
440 dataSize = sizeof(WINED3DQUERYTYPE_BANDWIDTHTIMINGS);
442 case WINED3DQUERYTYPE_CACHEUTILIZATION:
443 dataSize = sizeof(WINED3DDEVINFO_CACHEUTILIZATION);
446 FIXME("(%p) Unhandled query type %d\n",This , This->type);
452 static DWORD WINAPI IWineD3DEventQueryImpl_GetDataSize(IWineD3DQuery* iface){
453 TRACE("(%p) : type D3DQUERY_EVENT\n", iface);
458 static DWORD WINAPI IWineD3DOcclusionQueryImpl_GetDataSize(IWineD3DQuery* iface){
459 TRACE("(%p) : type D3DQUERY_OCCLUSION\n", iface);
461 return sizeof(DWORD);
464 static WINED3DQUERYTYPE WINAPI IWineD3DQueryImpl_GetType(IWineD3DQuery* iface){
465 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
470 static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags) {
471 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
473 TRACE("(%p) : dwIssueFlags %#x, type D3DQUERY_EVENT\n", This, dwIssueFlags);
474 if (dwIssueFlags & WINED3DISSUE_END)
476 struct wined3d_event_query *query = This->extendedData;
477 struct wined3d_context *context;
481 if (query->context->tid != GetCurrentThreadId())
483 context_free_event_query(query);
484 context = context_acquire(This->wineD3DDevice, NULL, CTXUSAGE_RESOURCELOAD);
485 context_alloc_event_query(context, query);
489 context = context_acquire(This->wineD3DDevice, query->context->current_rt, CTXUSAGE_RESOURCELOAD);
494 context = context_acquire(This->wineD3DDevice, NULL, CTXUSAGE_RESOURCELOAD);
495 context_alloc_event_query(context, query);
500 if (context->gl_info->supported[APPLE_FENCE])
502 GL_EXTCALL(glSetFenceAPPLE(query->id));
503 checkGLcall("glSetFenceAPPLE");
505 else if (context->gl_info->supported[NV_FENCE])
507 GL_EXTCALL(glSetFenceNV(query->id, GL_ALL_COMPLETED_NV));
508 checkGLcall("glSetFenceNV");
513 context_release(context);
515 else if(dwIssueFlags & WINED3DISSUE_BEGIN)
517 /* Started implicitly at device creation */
518 ERR("Event query issued with START flag - what to do?\n");
521 if(dwIssueFlags & WINED3DISSUE_BEGIN) {
522 This->state = QUERY_BUILDING;
524 This->state = QUERY_SIGNALLED;
530 static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags) {
531 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
532 IWineD3DDeviceImpl *device = This->wineD3DDevice;
533 const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
535 if (gl_info->supported[ARB_OCCLUSION_QUERY])
537 struct wined3d_occlusion_query *query = This->extendedData;
538 struct wined3d_context *context;
540 /* This is allowed according to msdn and our tests. Reset the query and restart */
541 if (dwIssueFlags & WINED3DISSUE_BEGIN)
543 if (This->state == QUERY_BUILDING)
545 if (query->context->tid != GetCurrentThreadId())
547 FIXME("Wrong thread, can't restart query.\n");
549 context_free_occlusion_query(query);
550 context = context_acquire(This->wineD3DDevice, NULL, CTXUSAGE_RESOURCELOAD);
551 context_alloc_occlusion_query(context, query);
555 context = context_acquire(This->wineD3DDevice, query->context->current_rt, CTXUSAGE_RESOURCELOAD);
558 GL_EXTCALL(glEndQueryARB(GL_SAMPLES_PASSED_ARB));
559 checkGLcall("glEndQuery()");
565 if (query->context) context_free_occlusion_query(query);
566 context = context_acquire(This->wineD3DDevice, NULL, CTXUSAGE_RESOURCELOAD);
567 context_alloc_occlusion_query(context, query);
571 GL_EXTCALL(glBeginQueryARB(GL_SAMPLES_PASSED_ARB, query->id));
572 checkGLcall("glBeginQuery()");
575 context_release(context);
577 if (dwIssueFlags & WINED3DISSUE_END) {
578 /* Msdn says _END on a non-building occlusion query returns an error, but
579 * our tests show that it returns OK. But OpenGL doesn't like it, so avoid
580 * generating an error
582 if (This->state == QUERY_BUILDING)
584 if (query->context->tid != GetCurrentThreadId())
586 FIXME("Wrong thread, can't end query.\n");
590 context = context_acquire(This->wineD3DDevice, query->context->current_rt, CTXUSAGE_RESOURCELOAD);
593 GL_EXTCALL(glEndQueryARB(GL_SAMPLES_PASSED_ARB));
594 checkGLcall("glEndQuery()");
597 context_release(context);
602 FIXME("(%p) : Occlusion queries not supported\n", This);
605 if(dwIssueFlags & WINED3DISSUE_BEGIN) {
606 This->state = QUERY_BUILDING;
608 This->state = QUERY_SIGNALLED;
610 return WINED3D_OK; /* can be WINED3DERR_INVALIDCALL. */
613 static HRESULT WINAPI IWineD3DQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags){
614 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
616 TRACE("(%p) : dwIssueFlags %#x, type %#x\n", This, dwIssueFlags, This->type);
618 /* The fixme is printed when the app asks for the resulting data */
619 WARN("(%p) : Unhandled query type %#x\n", This, This->type);
621 if(dwIssueFlags & WINED3DISSUE_BEGIN) {
622 This->state = QUERY_BUILDING;
624 This->state = QUERY_SIGNALLED;
627 return WINED3D_OK; /* can be WINED3DERR_INVALIDCALL. */
631 /**********************************************************
632 * IWineD3DQuery VTbl follows
633 **********************************************************/
635 const IWineD3DQueryVtbl IWineD3DQuery_Vtbl =
637 /*** IUnknown methods ***/
638 IWineD3DQueryImpl_QueryInterface,
639 IWineD3DQueryImpl_AddRef,
640 IWineD3DQueryImpl_Release,
641 /*** IWineD3Dquery methods ***/
642 IWineD3DQueryImpl_GetParent,
643 IWineD3DQueryImpl_GetDevice,
644 IWineD3DQueryImpl_GetData,
645 IWineD3DQueryImpl_GetDataSize,
646 IWineD3DQueryImpl_GetType,
647 IWineD3DQueryImpl_Issue
650 const IWineD3DQueryVtbl IWineD3DEventQuery_Vtbl =
652 /*** IUnknown methods ***/
653 IWineD3DQueryImpl_QueryInterface,
654 IWineD3DQueryImpl_AddRef,
655 IWineD3DQueryImpl_Release,
656 /*** IWineD3Dquery methods ***/
657 IWineD3DQueryImpl_GetParent,
658 IWineD3DQueryImpl_GetDevice,
659 IWineD3DEventQueryImpl_GetData,
660 IWineD3DEventQueryImpl_GetDataSize,
661 IWineD3DQueryImpl_GetType,
662 IWineD3DEventQueryImpl_Issue
665 const IWineD3DQueryVtbl IWineD3DOcclusionQuery_Vtbl =
667 /*** IUnknown methods ***/
668 IWineD3DQueryImpl_QueryInterface,
669 IWineD3DQueryImpl_AddRef,
670 IWineD3DQueryImpl_Release,
671 /*** IWineD3Dquery methods ***/
672 IWineD3DQueryImpl_GetParent,
673 IWineD3DQueryImpl_GetDevice,
674 IWineD3DOcclusionQueryImpl_GetData,
675 IWineD3DOcclusionQueryImpl_GetDataSize,
676 IWineD3DQueryImpl_GetType,
677 IWineD3DOcclusionQueryImpl_Issue