[PATCH 3/4] wined3d: Use a slightly shorter timeout in wined3d_event_query_finish().

Henri Verbeet hverbeet at codeweavers.com
Mon Aug 20 01:12:08 CDT 2012


Technically this is a driver bug and not our problem, but the workaround is
trivial enough that it's probably worth it.
---
 dlls/wined3d/query.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 4a3d7a7..2ee14a3 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -141,7 +141,10 @@ enum wined3d_event_query_result wined3d_event_query_finish(const struct wined3d_
     ENTER_GL();
     if (gl_info->supported[ARB_SYNC])
     {
-        GLenum gl_ret = GL_EXTCALL(glClientWaitSync(query->object.sync, 0, ~(GLuint64)0));
+        /* Apple seems to be into arbitrary limits, and timeouts larger than
+         * 0xfffffffffffffbff immediately return GL_TIMEOUT_EXPIRED. We don't
+         * really care and can live with waiting a few μs less. (OS X 10.7.4). */
+        GLenum gl_ret = GL_EXTCALL(glClientWaitSync(query->object.sync, GL_SYNC_FLUSH_COMMANDS_BIT, ~(GLuint64)0xffff));
         checkGLcall("glClientWaitSync");
 
         switch (gl_ret)
-- 
1.7.8.6




More information about the wine-patches mailing list