Mesa (master): mesa: In conditional rendering fallback, check the query status.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Aug 8 23:43:23 UTC 2012
Module: Mesa
Branch: master
Commit: 1b148e660e4cefcfbdc65ef8a58a7e52e8820782
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b148e660e4cefcfbdc65ef8a58a7e52e8820782
Author: Eric Anholt <eric at anholt.net>
Date: Mon Aug 6 08:26:30 2012 -0700
mesa: In conditional rendering fallback, check the query status.
Otherwise, conditional rendering always takes the fallthrough "render it
anyway" case unless the application had itself done a check or wait on the
query.
Fixes intel oglconform's conditional_render advanced.nofbo.readpixels.
Reviewed-by: Brian Paul <brianp at vmware.com>
NOTE: This is a candidate for the 8.0 branch.
---
src/mesa/main/condrender.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
index 57f3715..bfd2b08 100644
--- a/src/mesa/main/condrender.c
+++ b/src/mesa/main/condrender.c
@@ -139,6 +139,8 @@ _mesa_check_conditional_render(struct gl_context *ctx)
case GL_QUERY_BY_REGION_NO_WAIT:
/* fall-through */
case GL_QUERY_NO_WAIT:
+ if (!q->Ready)
+ ctx->Driver.CheckQuery(ctx, q);
return q->Ready ? (q->Result > 0) : GL_TRUE;
default:
_mesa_problem(ctx, "Bad cond render mode %s in "
More information about the mesa-commit
mailing list