Commit b949190d authored by Alexander Dorofeyev's avatar Alexander Dorofeyev Committed by Alexandre Julliard

wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DOcclusionQueryImpl_Issue.

parent 93fefdf9
...@@ -462,6 +462,7 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, D ...@@ -462,6 +462,7 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, D
if(ctx != This->wineD3DDevice->activeContext || ctx->tid != GetCurrentThreadId()) { if(ctx != This->wineD3DDevice->activeContext || ctx->tid != GetCurrentThreadId()) {
WARN("Not the owning context, can't start query\n"); WARN("Not the owning context, can't start query\n");
} else { } else {
ENTER_GL();
/* This is allowed according to msdn and our tests. Reset the query and restart */ /* This is allowed according to msdn and our tests. Reset the query and restart */
if (dwIssueFlags & WINED3DISSUE_BEGIN) { if (dwIssueFlags & WINED3DISSUE_BEGIN) {
if(This->state == QUERY_BUILDING) { if(This->state == QUERY_BUILDING) {
...@@ -482,6 +483,7 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, D ...@@ -482,6 +483,7 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, D
checkGLcall("glEndQuery()"); checkGLcall("glEndQuery()");
} }
} }
LEAVE_GL();
} }
} else { } else {
FIXME("(%p) : Occlusion queries not supported\n", This); FIXME("(%p) : Occlusion queries not supported\n", This);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment