From ac265c0a968d1f57e800ec9a2be9f1912f54359f Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Sat, 19 Dec 2020 16:23:16 +1300 Subject: [PATCH] panfrost: Fix precise occlusion queries on Bifrost Bifrost doesn't need the sample count to be divided by four for non-MSAA framebuffers. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 4955eac39ba..ecef80906e6 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1446,7 +1446,7 @@ panfrost_get_query_result(struct pipe_context *pipe, for (int i = 0; i < dev->core_count; ++i) passed += result[i]; - if (!query->msaa) + if (!(dev->quirks & IS_BIFROST) && !query->msaa) passed /= 4; vresult->u64 = passed;