Stefan Dösinger : wined3d: Create query private data when faking the query.

Alexandre Julliard julliard at winehq.org
Mon Oct 22 09:55:39 CDT 2007


Module: wine
Branch: master
Commit: 0add13759c4401423c3f729803ae9d343276e54c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0add13759c4401423c3f729803ae9d343276e54c

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Fri Oct 12 09:32:43 2007 +0200

wined3d: Create query private data when faking the query.

---

 dlls/wined3d/device.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 056186c..7a1b79d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1219,24 +1219,24 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINE
     /* allocated the 'extended' data based on the type of query requested */
     switch(Type){
     case WINED3DQUERYTYPE_OCCLUSION:
+        object->extendedData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WineQueryOcclusionData));
+        ((WineQueryOcclusionData *)(object->extendedData))->ctx = This->activeContext;
+
         if(GL_SUPPORT(ARB_OCCLUSION_QUERY)) {
             TRACE("(%p) Allocating data for an occlusion query\n", This);
-            object->extendedData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WineQueryOcclusionData));
             GL_EXTCALL(glGenQueriesARB(1, &((WineQueryOcclusionData *)(object->extendedData))->queryId));
-            ((WineQueryOcclusionData *)(object->extendedData))->ctx = This->activeContext;
             break;
         }
     case WINED3DQUERYTYPE_EVENT:
+        object->extendedData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WineQueryEventData));
+        ((WineQueryEventData *)(object->extendedData))->ctx = This->activeContext;
+
         if(GL_SUPPORT(APPLE_FENCE)) {
-            object->extendedData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WineQueryEventData));
             GL_EXTCALL(glGenFencesAPPLE(1, &((WineQueryEventData *)(object->extendedData))->fenceId));
             checkGLcall("glGenFencesAPPLE");
-            ((WineQueryEventData *)(object->extendedData))->ctx = This->activeContext;
         } else if(GL_SUPPORT(NV_FENCE)) {
-            object->extendedData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WineQueryEventData));
             GL_EXTCALL(glGenFencesNV(1, &((WineQueryEventData *)(object->extendedData))->fenceId));
             checkGLcall("glGenFencesNV");
-            ((WineQueryEventData *)(object->extendedData))->ctx = This->activeContext;
         }
         break;
 




More information about the wine-cvs mailing list