diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 5728ec6fe8a..9d0b6c430b2 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -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