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 <imirkin@alum.mit.edu>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: "11.2" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
a4678311be
commit
dcbf8377be
|
@ -900,11 +900,16 @@ void
|
||||||
_swrast_render_finish( struct gl_context *ctx )
|
_swrast_render_finish( struct gl_context *ctx )
|
||||||
{
|
{
|
||||||
SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
||||||
|
struct gl_query_object *query = ctx->Query.CurrentOcclusionObject;
|
||||||
|
|
||||||
_swrast_flush(ctx);
|
_swrast_flush(ctx);
|
||||||
|
|
||||||
if (swrast->Driver.SpanRenderFinish)
|
if (swrast->Driver.SpanRenderFinish)
|
||||||
swrast->Driver.SpanRenderFinish( ctx );
|
swrast->Driver.SpanRenderFinish( ctx );
|
||||||
|
|
||||||
|
if (query && (query->Target == GL_ANY_SAMPLES_PASSED ||
|
||||||
|
query->Target == GL_ANY_SAMPLES_PASSED_CONSERVATIVE))
|
||||||
|
query->Result = !!query->Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue