wined3d: Make sure a context is set for query object generation.
This commit is contained in:
parent
a886b4743f
commit
7806e4d85a
|
@ -1237,13 +1237,19 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINE
|
|||
|
||||
if(GL_SUPPORT(ARB_OCCLUSION_QUERY)) {
|
||||
TRACE("(%p) Allocating data for an occlusion query\n", This);
|
||||
|
||||
ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
ENTER_GL();
|
||||
GL_EXTCALL(glGenQueriesARB(1, &((WineQueryOcclusionData *)(object->extendedData))->queryId));
|
||||
LEAVE_GL();
|
||||
break;
|
||||
}
|
||||
case WINED3DQUERYTYPE_EVENT:
|
||||
object->extendedData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WineQueryEventData));
|
||||
((WineQueryEventData *)(object->extendedData))->ctx = This->activeContext;
|
||||
|
||||
ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
|
||||
ENTER_GL();
|
||||
if(GL_SUPPORT(APPLE_FENCE)) {
|
||||
GL_EXTCALL(glGenFencesAPPLE(1, &((WineQueryEventData *)(object->extendedData))->fenceId));
|
||||
checkGLcall("glGenFencesAPPLE");
|
||||
|
@ -1251,6 +1257,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINE
|
|||
GL_EXTCALL(glGenFencesNV(1, &((WineQueryEventData *)(object->extendedData))->fenceId));
|
||||
checkGLcall("glGenFencesNV");
|
||||
}
|
||||
LEAVE_GL();
|
||||
break;
|
||||
|
||||
case WINED3DQUERYTYPE_VCACHE:
|
||||
|
|
Loading…
Reference in New Issue