diff options
author | Ilia Mirkin <[email protected]> | 2016-03-03 21:00:06 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-03-05 23:25:52 -0500 |
commit | dcbf8377befde50fe4d75738e2af5813e06e8f04 (patch) | |
tree | 837841f6974df0c89b0ecded6d6c2dca8bb1f35c /src/mesa | |
parent | a4678311bec7ea03531142c2f7d12572a296ce29 (diff) |
swrast: fix GL_ANY_SAMPLES_PASSED values in Result
Since commit 922be4eab, the expectation is that the query result
contains the correct value. Unfortunately swrast does not distinguish
between GL_SAMPLES_PASSED and GL_ANY_SAMPLES_PASSED. As a result, we
must fix up the query result in a post-draw fixup.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94274
Signed-off-by: Ilia Mirkin <[email protected]>
Tested-by: Vinson Lee <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Cc: "11.2" <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/swrast/s_context.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index af24207e567..0a5fc7e9329 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -900,11 +900,16 @@ void _swrast_render_finish( struct gl_context *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); + struct gl_query_object *query = ctx->Query.CurrentOcclusionObject; _swrast_flush(ctx); if (swrast->Driver.SpanRenderFinish) swrast->Driver.SpanRenderFinish( ctx ); + + if (query && (query->Target == GL_ANY_SAMPLES_PASSED || + query->Target == GL_ANY_SAMPLES_PASSED_CONSERVATIVE)) + query->Result = !!query->Result; } |