From 04148f4411169bed0784d2bb47f763c429011223 Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Sat, 20 Jun 2020 23:34:53 -0400 Subject: [PATCH] turnip: fix update_stencil_mask The previous value was not being cleared, resulting in some dynamic stencil state failures. Fixes these two tests: dEQP-VK.dynamic_state.ds_state.stencil_params_advanced dEQP-VK.dynamic_state.ds_state.stencil_params_basic_1 Fixes: 233610f8cf8d8810 ("turnip: refactor draw states and dynamic states") Signed-off-by: Jonathan Marek Part-of: --- src/freedreno/vulkan/tu_cmd_buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 6b58a154c44..4441e5f725a 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -2336,9 +2336,9 @@ static void update_stencil_mask(uint32_t *value, VkStencilFaceFlags face, uint32_t mask) { if (face & VK_STENCIL_FACE_FRONT_BIT) - *value |= A6XX_RB_STENCILMASK_MASK(mask); + *value = (*value & 0xff00) | (mask & 0xff); if (face & VK_STENCIL_FACE_BACK_BIT) - *value |= A6XX_RB_STENCILMASK_BFMASK(mask); + *value = (*value & 0xff) | (mask & 0xff) << 8; } void -- 2.30.2