From 8c4e33cdabf44596461c6a216294e5785058fc9c Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 19 Jul 2022 13:42:00 +0200 Subject: [PATCH] radv: do not try to remove color exports for FS that need an epilog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The color format would be zero and all exports would be removed. Signed-off-by: Samuel Pitoiset Reviewed-by: Daniel Schürmann Reviewed-by: Timur Kristóf Part-of: --- src/amd/vulkan/radv_pipeline.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 1b84961761f..a0c32f5a285 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2572,7 +2572,10 @@ radv_pipeline_link_fs(struct radv_pipeline_stage *fs_stage, { assert(fs_stage->nir->info.stage == MESA_SHADER_FRAGMENT); - radv_remove_color_exports(pipeline_key, fs_stage->nir); + if (!pipeline_key->ps.has_epilog) { + /* Only remove color exports when the format is known. */ + radv_remove_color_exports(pipeline_key, fs_stage->nir); + } nir_foreach_shader_out_variable(var, fs_stage->nir) { var->data.driver_location = var->data.location + var->data.index;