2 * IWineD3DQuery implementation
4 * Copyright 2005 Oliver Stieber
5 * Copyright 2007-2008 Stefan Dösinger for CodeWeavers
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include "wined3d_private.h"
28 * http://www.gris.uni-tuebingen.de/~bartz/Publications/paper/hww98.pdf
29 * http://oss.sgi.com/projects/ogl-sample/registry/ARB/occlusion_query.txt
32 WINE_DEFAULT_DEBUG_CHANNEL(d3d);
33 #define GLINFO_LOCATION This->wineD3DDevice->adapter->gl_info
35 /* *******************************************
36 IWineD3DQuery IUnknown parts follow
37 ******************************************* */
38 static HRESULT WINAPI IWineD3DQueryImpl_QueryInterface(IWineD3DQuery *iface, REFIID riid, LPVOID *ppobj)
40 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
41 TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
42 if (IsEqualGUID(riid, &IID_IUnknown)
43 || IsEqualGUID(riid, &IID_IWineD3DBase)
44 || IsEqualGUID(riid, &IID_IWineD3DQuery)) {
45 IUnknown_AddRef(iface);
53 static ULONG WINAPI IWineD3DQueryImpl_AddRef(IWineD3DQuery *iface) {
54 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
55 TRACE("(%p) : AddRef increasing from %d\n", This, This->ref);
56 return InterlockedIncrement(&This->ref);
59 static ULONG WINAPI IWineD3DQueryImpl_Release(IWineD3DQuery *iface) {
60 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
62 TRACE("(%p) : Releasing from %d\n", This, This->ref);
63 ref = InterlockedDecrement(&This->ref);
65 /* Queries are specific to the GL context that created them. Not
66 * deleting the query will obviously leak it, but that's still better
67 * than potentially deleting a different query with the same id in this
68 * context, and (still) leaking the actual query. */
69 if (This->type == WINED3DQUERYTYPE_EVENT)
71 WineQueryEventData *query_data = (WineQueryEventData *)This->extendedData;
73 if (query_data->ctx->tid != GetCurrentThreadId())
75 FIXME("Query was created in a different thread, skipping deletion.\n");
79 ActivateContext(This->wineD3DDevice, query_data->ctx->surface, CTXUSAGE_RESOURCELOAD);
83 if (GL_SUPPORT(APPLE_FENCE))
85 GL_EXTCALL(glDeleteFencesAPPLE(1, &query_data->fenceId));
86 checkGLcall("glDeleteFencesAPPLE");
88 else if (GL_SUPPORT(NV_FENCE))
90 GL_EXTCALL(glDeleteFencesNV(1, &query_data->fenceId));
91 checkGLcall("glDeleteFencesNV");
97 else if (This->type == WINED3DQUERYTYPE_OCCLUSION)
99 struct wined3d_occlusion_query *query = This->extendedData;
101 if (query->context) context_free_occlusion_query(query);
104 HeapFree(GetProcessHeap(), 0, This->extendedData);
105 HeapFree(GetProcessHeap(), 0, This);
110 /* *******************************************
111 IWineD3DQuery IWineD3DQuery parts follow
112 ******************************************* */
113 static HRESULT WINAPI IWineD3DQueryImpl_GetParent(IWineD3DQuery *iface, IUnknown** parent){
114 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
116 *parent= (IUnknown*) parent;
117 IUnknown_AddRef(*parent);
118 TRACE("(%p) : returning %p\n", This, *parent);
122 static HRESULT WINAPI IWineD3DQueryImpl_GetDevice(IWineD3DQuery* iface, IWineD3DDevice **pDevice){
123 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
124 IWineD3DDevice_AddRef((IWineD3DDevice *)This->wineD3DDevice);
125 *pDevice = (IWineD3DDevice *)This->wineD3DDevice;
126 TRACE("(%p) returning %p\n", This, *pDevice);
131 static HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags){
132 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
135 TRACE("(%p) : type %#x, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, This->type, pData, dwSize, dwGetDataFlags);
139 case WINED3DQUERYTYPE_VCACHE:
142 WINED3DDEVINFO_VCACHE *data = pData;
143 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_VCACHE\n", This);
144 if(pData == NULL || dwSize == 0) break;
145 data->Pattern = WINEMAKEFOURCC('C','A','C','H');
146 data->OptMethod = 0; /*0 get longest strips, 1 optimize vertex cache*/
147 data->CacheSize = 0; /*cache size, only required if OptMethod == 1*/
148 data->MagicNumber = 0; /*only required if OptMethod == 1 (used internally)*/
152 case WINED3DQUERYTYPE_RESOURCEMANAGER:
154 WINED3DDEVINFO_RESOURCEMANAGER *data = pData;
156 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_RESOURCEMANAGER\n", This);
157 if(pData == NULL || dwSize == 0) break;
158 for(i = 0; i < WINED3DRTYPECOUNT; i++){
159 /*I'm setting the default values to 1 so as to reduce the risk of a div/0 in the caller*/
160 /* isTextureResident could be used to get some of this information */
161 data->stats[i].bThrashing = FALSE;
162 data->stats[i].ApproxBytesDownloaded = 1;
163 data->stats[i].NumEvicts = 1;
164 data->stats[i].NumVidCreates = 1;
165 data->stats[i].LastPri = 1;
166 data->stats[i].NumUsed = 1;
167 data->stats[i].NumUsedInVidMem = 1;
168 data->stats[i].WorkingSet = 1;
169 data->stats[i].WorkingSetBytes = 1;
170 data->stats[i].TotalManaged = 1;
171 data->stats[i].TotalBytes = 1;
176 case WINED3DQUERYTYPE_VERTEXSTATS:
178 WINED3DDEVINFO_VERTEXSTATS *data = pData;
179 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_VERTEXSTATS\n", This);
180 if(pData == NULL || dwSize == 0) break;
181 data->NumRenderedTriangles = 1;
182 data->NumExtraClippingTriangles = 1;
186 case WINED3DQUERYTYPE_TIMESTAMP:
188 UINT64* data = pData;
189 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_TIMESTAMP\n", This);
190 if(pData == NULL || dwSize == 0) break;
191 *data = 1; /*Don't know what this is supposed to be*/
194 case WINED3DQUERYTYPE_TIMESTAMPDISJOINT:
197 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_TIMESTAMPDISJOINT\n", This);
198 if(pData == NULL || dwSize == 0) break;
199 *data = FALSE; /*Don't know what this is supposed to be*/
202 case WINED3DQUERYTYPE_TIMESTAMPFREQ:
204 UINT64* data = pData;
205 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_TIMESTAMPFREQ\n", This);
206 if(pData == NULL || dwSize == 0) break;
207 *data = 1; /*Don't know what this is supposed to be*/
210 case WINED3DQUERYTYPE_PIPELINETIMINGS:
212 WINED3DDEVINFO_PIPELINETIMINGS *data = pData;
213 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_PIPELINETIMINGS\n", This);
214 if(pData == NULL || dwSize == 0) break;
216 data->VertexProcessingTimePercent = 1.0f;
217 data->PixelProcessingTimePercent = 1.0f;
218 data->OtherGPUProcessingTimePercent = 97.0f;
219 data->GPUIdleTimePercent = 1.0f;
222 case WINED3DQUERYTYPE_INTERFACETIMINGS:
224 WINED3DDEVINFO_INTERFACETIMINGS *data = pData;
225 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_INTERFACETIMINGS\n", This);
227 if(pData == NULL || dwSize == 0) break;
228 data->WaitingForGPUToUseApplicationResourceTimePercent = 1.0f;
229 data->WaitingForGPUToAcceptMoreCommandsTimePercent = 1.0f;
230 data->WaitingForGPUToStayWithinLatencyTimePercent = 1.0f;
231 data->WaitingForGPUExclusiveResourceTimePercent = 1.0f;
232 data->WaitingForGPUOtherTimePercent = 96.0f;
236 case WINED3DQUERYTYPE_VERTEXTIMINGS:
238 WINED3DDEVINFO_STAGETIMINGS *data = pData;
239 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_VERTEXTIMINGS\n", This);
241 if(pData == NULL || dwSize == 0) break;
242 data->MemoryProcessingPercent = 50.0f;
243 data->ComputationProcessingPercent = 50.0f;
247 case WINED3DQUERYTYPE_PIXELTIMINGS:
249 WINED3DDEVINFO_STAGETIMINGS *data = pData;
250 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_PIXELTIMINGS\n", This);
252 if(pData == NULL || dwSize == 0) break;
253 data->MemoryProcessingPercent = 50.0f;
254 data->ComputationProcessingPercent = 50.0f;
257 case WINED3DQUERYTYPE_BANDWIDTHTIMINGS:
259 WINED3DDEVINFO_BANDWIDTHTIMINGS *data = pData;
260 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_BANDWIDTHTIMINGS\n", This);
262 if(pData == NULL || dwSize == 0) break;
263 data->MaxBandwidthUtilized = 1.0f;
264 data->FrontEndUploadMemoryUtilizedPercent = 1.0f;
265 data->VertexRateUtilizedPercent = 1.0f;
266 data->TriangleSetupRateUtilizedPercent = 1.0f;
267 data->FillRateUtilizedPercent = 97.0f;
270 case WINED3DQUERYTYPE_CACHEUTILIZATION:
272 WINED3DDEVINFO_CACHEUTILIZATION *data = pData;
273 FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_CACHEUTILIZATION\n", This);
275 if(pData == NULL || dwSize == 0) break;
276 data->TextureCacheHitRate = 1.0f;
277 data->PostTransformVertexCacheHitRate = 1.0f;
283 FIXME("(%p) Unhandled query type %d\n",This , This->type);
287 /*dwGetDataFlags = 0 || D3DGETDATA_FLUSH
288 D3DGETDATA_FLUSH may return WINED3DERR_DEVICELOST if the device is lost
290 return res; /* S_OK if the query data is available*/
293 static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) {
294 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface;
295 struct wined3d_occlusion_query *query = This->extendedData;
301 TRACE("(%p) : type D3DQUERY_OCCLUSION, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags);
303 if (!query->context) This->state = QUERY_CREATED;
305 if (This->state == QUERY_CREATED)
307 /* D3D allows GetData on a new query, OpenGL doesn't. So just invent the data ourselves */
308 TRACE("Query wasn't yet started, returning S_OK\n");
313 if (This->state == QUERY_BUILDING)
315 /* Msdn says this returns an error, but our tests show that S_FALSE is returned */
316 TRACE("Query is building, returning S_FALSE\n");
320 if (!GL_SUPPORT(ARB_OCCLUSION_QUERY))
322 WARN("(%p) : Occlusion queries not supported. Returning 1.\n", This);
327 if (query->context->tid != GetCurrentThreadId())
329 FIXME("%p Wrong thread, returning 1.\n", This);
334 ActivateContext(This->wineD3DDevice, query->context->current_rt, CTXUSAGE_RESOURCELOAD);
338 GL_EXTCALL(glGetQueryObjectuivARB(query->id, GL_QUERY_RESULT_AVAILABLE_ARB, &available));
339 checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT_AVAILABLE)");
340 TRACE("(%p) : available %d.\n", This, available);
346 GL_EXTCALL(glGetQueryObjectuivARB(query->id, GL_QUERY_RESULT_ARB, &samples));
347 checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT)");
348 TRACE("(%p) : Returning %d samples.\n", This, samples);
363 static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) {
364 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface;
366 WineQueryEventData *query_data = (WineQueryEventData *)This->extendedData;
368 TRACE("(%p) : type D3DQUERY_EVENT, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags);
370 if (!pData || !dwSize) return S_OK;
372 if (query_data->ctx->tid != GetCurrentThreadId())
374 /* See comment in IWineD3DQuery::Issue, event query codeblock */
375 FIXME("Wrong thread, reporting GPU idle.\n");
381 ActivateContext(This->wineD3DDevice, query_data->ctx->surface, CTXUSAGE_RESOURCELOAD);
385 if (GL_SUPPORT(APPLE_FENCE))
387 *data = GL_EXTCALL(glTestFenceAPPLE(query_data->fenceId));
388 checkGLcall("glTestFenceAPPLE");
390 else if (GL_SUPPORT(NV_FENCE))
392 *data = GL_EXTCALL(glTestFenceNV(query_data->fenceId));
393 checkGLcall("glTestFenceNV");
397 WARN("(%p): reporting GPU idle\n", This);
406 static DWORD WINAPI IWineD3DQueryImpl_GetDataSize(IWineD3DQuery* iface){
407 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
409 TRACE("(%p) : type %#x\n", This, This->type);
411 case WINED3DQUERYTYPE_VCACHE:
412 dataSize = sizeof(WINED3DDEVINFO_VCACHE);
414 case WINED3DQUERYTYPE_RESOURCEMANAGER:
415 dataSize = sizeof(WINED3DDEVINFO_RESOURCEMANAGER);
417 case WINED3DQUERYTYPE_VERTEXSTATS:
418 dataSize = sizeof(WINED3DDEVINFO_VERTEXSTATS);
420 case WINED3DQUERYTYPE_EVENT:
421 dataSize = sizeof(BOOL);
423 case WINED3DQUERYTYPE_TIMESTAMP:
424 dataSize = sizeof(UINT64);
426 case WINED3DQUERYTYPE_TIMESTAMPDISJOINT:
427 dataSize = sizeof(BOOL);
429 case WINED3DQUERYTYPE_TIMESTAMPFREQ:
430 dataSize = sizeof(UINT64);
432 case WINED3DQUERYTYPE_PIPELINETIMINGS:
433 dataSize = sizeof(WINED3DDEVINFO_PIPELINETIMINGS);
435 case WINED3DQUERYTYPE_INTERFACETIMINGS:
436 dataSize = sizeof(WINED3DDEVINFO_INTERFACETIMINGS);
438 case WINED3DQUERYTYPE_VERTEXTIMINGS:
439 dataSize = sizeof(WINED3DDEVINFO_STAGETIMINGS);
441 case WINED3DQUERYTYPE_PIXELTIMINGS:
442 dataSize = sizeof(WINED3DDEVINFO_STAGETIMINGS);
444 case WINED3DQUERYTYPE_BANDWIDTHTIMINGS:
445 dataSize = sizeof(WINED3DQUERYTYPE_BANDWIDTHTIMINGS);
447 case WINED3DQUERYTYPE_CACHEUTILIZATION:
448 dataSize = sizeof(WINED3DDEVINFO_CACHEUTILIZATION);
451 FIXME("(%p) Unhandled query type %d\n",This , This->type);
457 static DWORD WINAPI IWineD3DEventQueryImpl_GetDataSize(IWineD3DQuery* iface){
458 TRACE("(%p) : type D3DQUERY_EVENT\n", iface);
463 static DWORD WINAPI IWineD3DOcclusionQueryImpl_GetDataSize(IWineD3DQuery* iface){
464 TRACE("(%p) : type D3DQUERY_OCCLUSION\n", iface);
466 return sizeof(DWORD);
469 static WINED3DQUERYTYPE WINAPI IWineD3DQueryImpl_GetType(IWineD3DQuery* iface){
470 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
475 static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags) {
476 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
478 TRACE("(%p) : dwIssueFlags %#x, type D3DQUERY_EVENT\n", This, dwIssueFlags);
479 if (dwIssueFlags & WINED3DISSUE_END)
481 WineQueryEventData *query_data = (WineQueryEventData *)This->extendedData;
483 if (query_data->ctx->tid != GetCurrentThreadId())
485 /* GL fences can be used only from the context that created them,
486 * so if a different context is active, don't bother setting the query. The penalty
487 * of a context switch is most likely higher than the gain of a correct query result
489 * If the query is used from a different thread, don't bother creating a multithread
490 * context - there's no point in doing that as the query would be unusable anyway
492 WARN("Query context not active\n");
496 ActivateContext(This->wineD3DDevice, query_data->ctx->surface, CTXUSAGE_RESOURCELOAD);
500 if (GL_SUPPORT(APPLE_FENCE))
502 GL_EXTCALL(glSetFenceAPPLE(query_data->fenceId));
503 checkGLcall("glSetFenceAPPLE");
505 else if (GL_SUPPORT(NV_FENCE))
507 GL_EXTCALL(glSetFenceNV(query_data->fenceId, GL_ALL_COMPLETED_NV));
508 checkGLcall("glSetFenceNV");
513 } else if(dwIssueFlags & WINED3DISSUE_BEGIN) {
514 /* Started implicitly at device creation */
515 ERR("Event query issued with START flag - what to do?\n");
518 if(dwIssueFlags & WINED3DISSUE_BEGIN) {
519 This->state = QUERY_BUILDING;
521 This->state = QUERY_SIGNALLED;
527 static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags) {
528 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
530 if (GL_SUPPORT(ARB_OCCLUSION_QUERY))
532 struct wined3d_occlusion_query *query = This->extendedData;
533 struct WineD3DContext *context;
535 /* This is allowed according to msdn and our tests. Reset the query and restart */
536 if (dwIssueFlags & WINED3DISSUE_BEGIN)
538 if (This->state == QUERY_BUILDING)
540 if (query->context->tid != GetCurrentThreadId())
542 FIXME("Wrong thread, can't restart query.\n");
544 context_free_occlusion_query(query);
545 context = ActivateContext(This->wineD3DDevice, NULL, CTXUSAGE_RESOURCELOAD);
546 context_alloc_occlusion_query(context, query);
550 ActivateContext(This->wineD3DDevice, query->context->current_rt, CTXUSAGE_RESOURCELOAD);
553 GL_EXTCALL(glEndQueryARB(GL_SAMPLES_PASSED_ARB));
554 checkGLcall("glEndQuery()");
560 if (query->context) context_free_occlusion_query(query);
561 context = ActivateContext(This->wineD3DDevice, NULL, CTXUSAGE_RESOURCELOAD);
562 context_alloc_occlusion_query(context, query);
566 GL_EXTCALL(glBeginQueryARB(GL_SAMPLES_PASSED_ARB, query->id));
567 checkGLcall("glBeginQuery()");
570 if (dwIssueFlags & WINED3DISSUE_END) {
571 /* Msdn says _END on a non-building occlusion query returns an error, but
572 * our tests show that it returns OK. But OpenGL doesn't like it, so avoid
573 * generating an error
575 if (This->state == QUERY_BUILDING)
577 if (query->context->tid != GetCurrentThreadId())
579 FIXME("Wrong thread, can't end query.\n");
583 ActivateContext(This->wineD3DDevice, query->context->current_rt, CTXUSAGE_RESOURCELOAD);
586 GL_EXTCALL(glEndQueryARB(GL_SAMPLES_PASSED_ARB));
587 checkGLcall("glEndQuery()");
593 FIXME("(%p) : Occlusion queries not supported\n", This);
596 if(dwIssueFlags & WINED3DISSUE_BEGIN) {
597 This->state = QUERY_BUILDING;
599 This->state = QUERY_SIGNALLED;
601 return WINED3D_OK; /* can be WINED3DERR_INVALIDCALL. */
604 static HRESULT WINAPI IWineD3DQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags){
605 IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
607 TRACE("(%p) : dwIssueFlags %#x, type %#x\n", This, dwIssueFlags, This->type);
609 /* The fixme is printed when the app asks for the resulting data */
610 WARN("(%p) : Unhandled query type %#x\n", This, This->type);
612 if(dwIssueFlags & WINED3DISSUE_BEGIN) {
613 This->state = QUERY_BUILDING;
615 This->state = QUERY_SIGNALLED;
618 return WINED3D_OK; /* can be WINED3DERR_INVALIDCALL. */
622 /**********************************************************
623 * IWineD3DQuery VTbl follows
624 **********************************************************/
626 const IWineD3DQueryVtbl IWineD3DQuery_Vtbl =
628 /*** IUnknown methods ***/
629 IWineD3DQueryImpl_QueryInterface,
630 IWineD3DQueryImpl_AddRef,
631 IWineD3DQueryImpl_Release,
632 /*** IWineD3Dquery methods ***/
633 IWineD3DQueryImpl_GetParent,
634 IWineD3DQueryImpl_GetDevice,
635 IWineD3DQueryImpl_GetData,
636 IWineD3DQueryImpl_GetDataSize,
637 IWineD3DQueryImpl_GetType,
638 IWineD3DQueryImpl_Issue
641 const IWineD3DQueryVtbl IWineD3DEventQuery_Vtbl =
643 /*** IUnknown methods ***/
644 IWineD3DQueryImpl_QueryInterface,
645 IWineD3DQueryImpl_AddRef,
646 IWineD3DQueryImpl_Release,
647 /*** IWineD3Dquery methods ***/
648 IWineD3DQueryImpl_GetParent,
649 IWineD3DQueryImpl_GetDevice,
650 IWineD3DEventQueryImpl_GetData,
651 IWineD3DEventQueryImpl_GetDataSize,
652 IWineD3DQueryImpl_GetType,
653 IWineD3DEventQueryImpl_Issue
656 const IWineD3DQueryVtbl IWineD3DOcclusionQuery_Vtbl =
658 /*** IUnknown methods ***/
659 IWineD3DQueryImpl_QueryInterface,
660 IWineD3DQueryImpl_AddRef,
661 IWineD3DQueryImpl_Release,
662 /*** IWineD3Dquery methods ***/
663 IWineD3DQueryImpl_GetParent,
664 IWineD3DQueryImpl_GetDevice,
665 IWineD3DOcclusionQueryImpl_GetData,
666 IWineD3DOcclusionQueryImpl_GetDataSize,
667 IWineD3DQueryImpl_GetType,
668 IWineD3DOcclusionQueryImpl_Issue