diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index af0f9ed12f1..129d632c555 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2421,7 +2421,14 @@ radv_generate_graphics_pipeline_key(const struct radv_graphics_pipeline *pipelin !(lib_flags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT)) || key.ps.dynamic_ps_epilog); - key.ps.epilog = radv_pipeline_generate_ps_epilog_key(pipeline, state, key.ps.has_epilog); + /* Disable MRT compaction when it's not possible to know both the written color outputs and the + * color blend attachments. + */ + bool disable_mrt_compaction = key.ps.has_epilog || + ((lib_flags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT) && + !(lib_flags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT)); + + key.ps.epilog = radv_pipeline_generate_ps_epilog_key(pipeline, state, disable_mrt_compaction); key.dynamic_patch_control_points = !!(pipeline->dynamic_states & RADV_DYNAMIC_PATCH_CONTROL_POINTS);