wined3d: Do not block waiting for occlusion query result in GetData.

Ken Thomases ken at codeweavers.com
Thu Jan 11 16:48:15 CST 2007


MSDN shows GetData returning S_FALSE even when passed D3DGETDATA_FLUSH.
   <http://msdn.microsoft.com/library/en-us/directx9_c/Queries.asp>
Apparently, D3DGETDATA_FLUSH means GetData has permission to flush the command
buffer.  glGetQueryObjectuivARB(GL_QUERY_RESULT_AVAILABLE) implicitly flushes
as necessary, with no way for us to control it.  So, we ignore D3DGETDATA_FLUSH.
---
  dlls/wined3d/query.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
-------------- next part --------------
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 32cacd6..9dafb12 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -170,7 +170,7 @@ static HRESULT  WINAPI IWineD3DQueryImpl
             checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT_AVAILABLE)\n");
             TRACE("(%p) : available %d.\n", This, available);
 
-            if (available || dwGetDataFlags & WINED3DGETDATA_FLUSH) {
+            if (available) {
                 GL_EXTCALL(glGetQueryObjectuivARB(queryId, GL_QUERY_RESULT_ARB, &samples));
                 checkGLcall("glGetQueryObjectuivARB(GL_QUERY_RESULT)\n");
                 TRACE("(%p) : Returning %d samples.\n", This, samples);


More information about the wine-patches mailing list