From 28440820eff55d412fbce3243c24bc9f58c3b8e6 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Mon, 4 Nov 2019 11:57:22 +0100 Subject: panfrost: MALI_DEPTH_TEST is actually MALI_DEPTH_WRITEMASK MALI_DEPTH_TEST should only be set when depth->writemask is true, not when the depth test is enabled. Let's rename the flag and patch panfrost_bind_depth_stencil_state() to do the right thing. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/panfrost') diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 69b3b96295d..285936c5c26 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -2346,7 +2346,8 @@ panfrost_bind_depth_stencil_state(struct pipe_context *pipe, ctx->fragment_shader_core.stencil_mask_back = depth_stencil->stencil[back_index].writemask; /* Depth state (TODO: Refactor) */ - SET_BIT(ctx->fragment_shader_core.unknown2_3, MALI_DEPTH_TEST, depth_stencil->depth.enabled); + SET_BIT(ctx->fragment_shader_core.unknown2_3, MALI_DEPTH_WRITEMASK, + depth_stencil->depth.writemask); int func = depth_stencil->depth.enabled ? depth_stencil->depth.func : PIPE_FUNC_ALWAYS; -- cgit v1.2.3