Module: Mesa Branch: main Commit: 52d35cc82a67d17608ad54236ac41ce46cd37021 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=52d35cc82a67d17608ad54236ac41ce46cd37021
Author: Emma Anholt <[email protected]> Date: Tue Sep 13 15:58:58 2022 -0700 turnip: Ignore dynamic color write enables past our number of attachments. We were always disabling LRZ writes on zink+turnip because it sets all the color write enables (translating directly from GL turning them all on). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18606> --- src/freedreno/vulkan/tu_lrz.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/freedreno/vulkan/tu_lrz.c b/src/freedreno/vulkan/tu_lrz.c index 82098a98876..737b5c9485f 100644 --- a/src/freedreno/vulkan/tu_lrz.c +++ b/src/freedreno/vulkan/tu_lrz.c @@ -682,8 +682,11 @@ tu6_calculate_lrz_state(struct tu_cmd_buffer *cmd, gras_lrz_cntl.lrz_write = false; } - if ((cmd->state.pipeline->dynamic_state_mask & BIT(TU_DYNAMIC_STATE_COLOR_WRITE_ENABLE)) && - cmd->state.color_write_enable != MASK(cmd->state.pipeline->num_rts)) { + if ((cmd->state.pipeline->dynamic_state_mask & + BIT(TU_DYNAMIC_STATE_COLOR_WRITE_ENABLE)) && + (cmd->state.color_write_enable & + MASK(cmd->state.subpass->color_count)) != + MASK(cmd->state.pipeline->num_rts)) { if (gras_lrz_cntl.lrz_write) { perf_debug( cmd->device,
