Alexander Dorofeyev : wined3d: Add ENTER_GL/ LEAVE_GL in IWineD3DOcclusionQueryImpl_Issue.

Alexandre Julliard julliard at winehq.org
Mon Apr 7 14:46:57 CDT 2008


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

Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date:   Mon Apr  7 00:06:19 2008 +0300

wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DOcclusionQueryImpl_Issue.

---

 dlls/wined3d/query.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 96651bc..45e35b7 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -462,6 +462,7 @@ static HRESULT  WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface,  D
         if(ctx != This->wineD3DDevice->activeContext || ctx->tid != GetCurrentThreadId()) {
             WARN("Not the owning context, can't start query\n");
         } else {
+            ENTER_GL();
             /* This is allowed according to msdn and our tests. Reset the query and restart */
             if (dwIssueFlags & WINED3DISSUE_BEGIN) {
                 if(This->state == QUERY_BUILDING) {
@@ -482,6 +483,7 @@ static HRESULT  WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface,  D
                     checkGLcall("glEndQuery()");
                 }
             }
+            LEAVE_GL();
         }
     } else {
         FIXME("(%p) : Occlusion queries not supported\n", This);




More information about the wine-cvs mailing list