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 <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5586>
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