panfrost: Only enable occlusion queries when active

Fixes piglit tests:
 - occlusion_query_meta_fragments
 - occlusion_query_meta_save

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7074>
This commit is contained in:
Icecream95 2020-10-15 00:08:36 +13:00 committed by Marge Bot
parent 04e955f19b
commit c97e82bab5
1 changed files with 1 additions and 1 deletions

View File

@ -401,7 +401,7 @@ panfrost_draw_emit_tiler(struct panfrost_batch *batch,
pan_emit_draw_descs(batch, &cfg, PIPE_SHADER_FRAGMENT);
if (ctx->occlusion_query) {
if (ctx->occlusion_query && ctx->active_queries) {
if (ctx->occlusion_query->type == PIPE_QUERY_OCCLUSION_COUNTER)
cfg.occlusion_query = MALI_OCCLUSION_MODE_COUNTER;
else