summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-08-06 08:26:30 -0700
committerEric Anholt <[email protected]>2012-08-08 16:21:30 -0700
commit1b148e660e4cefcfbdc65ef8a58a7e52e8820782 (patch)
tree558a036c47f4a8e3ced55ec198b230f815d58f18 /src/mesa
parent4bbd12036819ed6a2d0993c437e0c02bf0c92b0b (diff)
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 <[email protected]> NOTE: This is a candidate for the 8.0 branch.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/condrender.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
index 57f3715211d..bfd2b081807 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 "