From: Alyssa Rosenzweig Date: Thu, 14 Feb 2019 02:44:03 +0000 (+0000) Subject: panfrost: Identify MALI_OCCLUSION_PRECISE bit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d22b5380cc0b66efb38f2d9cd09af8eab602011;p=mesa.git panfrost: Identify MALI_OCCLUSION_PRECISE bit Setting this is required for desktop-style occlusion queries. Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/include/panfrost-job.h b/src/gallium/drivers/panfrost/include/panfrost-job.h index 3b51fcfddef..e11f4395e57 100644 --- a/src/gallium/drivers/panfrost/include/panfrost-job.h +++ b/src/gallium/drivers/panfrost/include/panfrost-job.h @@ -69,14 +69,16 @@ enum mali_draw_mode { /* Applies to tiler_gl_enables */ -#define MALI_CULL_FACE_BACK 0x80 -#define MALI_CULL_FACE_FRONT 0x40 -#define MALI_FRONT_FACE(v) (v << 5) +#define MALI_OCCLUSION_QUERY (1 << 3) +#define MALI_OCCLUSION_PRECISE (1 << 4) + +#define MALI_FRONT_FACE(v) (v << 5) #define MALI_CCW (0) #define MALI_CW (1) -#define MALI_OCCLUSION_BOOLEAN 0x8 +#define MALI_CULL_FACE_FRONT (1 << 6) +#define MALI_CULL_FACE_BACK (1 << 7) /* TODO: Might this actually be a finer bitfield? */ #define MALI_DEPTH_STENCIL_ENABLE 0x6400 diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 44c0ea3e8f5..368b3b8759a 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1105,7 +1105,7 @@ panfrost_emit_for_draw(struct panfrost_context *ctx, bool with_vertex_data) } if (ctx->occlusion_query) { - ctx->payload_tiler.gl_enables |= MALI_OCCLUSION_BOOLEAN; + ctx->payload_tiler.gl_enables |= MALI_OCCLUSION_QUERY | MALI_OCCLUSION_PRECISE; ctx->payload_tiler.postfix.occlusion_counter = ctx->occlusion_query->transfer.gpu; }