Module: Mesa Branch: main Commit: bd545924877dadc59a5b008a80942a863c5ffbda URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bd545924877dadc59a5b008a80942a863c5ffbda
Author: Samuel Pitoiset <samuel.pitoi...@gmail.com> Date: Wed Nov 29 15:01:32 2023 +0100 radv: remove radv_pipeline_key::dynamic_color_write_mask When this state is dynamic, the common runtime code sets the write mask to 0xf which prevents color exports to be removed. Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26400> --- src/amd/vulkan/radv_pipeline_graphics.c | 9 ++------- src/amd/vulkan/radv_shader.h | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline_graphics.c b/src/amd/vulkan/radv_pipeline_graphics.c index 772da4168a9..d63792e8ad9 100644 --- a/src/amd/vulkan/radv_pipeline_graphics.c +++ b/src/amd/vulkan/radv_pipeline_graphics.c @@ -1225,14 +1225,11 @@ radv_remove_color_exports(const struct radv_pipeline_key *pipeline_key, nir_shad { bool fixup_derefs = false; - /* Do not remove color exports when a PS epilog is used because the format isn't known. */ + /* Do not remove color exports when a PS epilog is used because the format isn't known and the color write mask can + * be dynamic. */ if (pipeline_key->ps.has_epilog) return; - /* Do not remove color exports when the write mask is dynamic. */ - if (pipeline_key->dynamic_color_write_mask) - return; - nir_foreach_shader_out_variable (var, nir) { int idx = var->data.location; idx -= FRAG_RESULT_DATA0; @@ -1952,8 +1949,6 @@ radv_generate_graphics_pipeline_key(const struct radv_device *device, const stru key.dynamic_rasterization_samples = !!(pipeline->dynamic_states & RADV_DYNAMIC_RASTERIZATION_SAMPLES) || (!!(pipeline->active_stages & VK_SHADER_STAGE_FRAGMENT_BIT) && !state->ms); - key.dynamic_color_write_mask = !!(pipeline->dynamic_states & RADV_DYNAMIC_COLOR_WRITE_MASK); - if (device->physical_device->use_ngg) { VkShaderStageFlags ngg_stage; diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index ab0b58d87cf..bd68c183c52 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -91,7 +91,6 @@ struct radv_pipeline_key { uint32_t primitives_generated_query : 1; uint32_t dynamic_patch_control_points : 1; uint32_t dynamic_rasterization_samples : 1; - uint32_t dynamic_color_write_mask : 1; uint32_t dynamic_provoking_vtx_mode : 1; uint32_t dynamic_line_rast_mode : 1; uint32_t tex_non_uniform : 1;