From 2784bfe93fdbf72d63dcbcd08b883e6ad8bccc36 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 24 Jun 2022 14:39:10 +0200 Subject: [PATCH] aco: do not abort if the FS doesn't export anything but has an epilog MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The main fragment shader can only export MRTZ (if present) and the epilog will export colors. Signed-off-by: Samuel Pitoiset Reviewed-by: Timur Kristóf Part-of: --- src/amd/compiler/aco_assembler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp index 0a6feff..e6b820a 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -808,8 +808,14 @@ fix_exports(asm_context& ctx, std::vector& out, Program* program) exported = true; break; } - } else if ((*it)->definitions.size() && (*it)->definitions[0].physReg() == exec) + } else if ((*it)->definitions.size() && (*it)->definitions[0].physReg() == exec) { break; + } else if ((*it)->opcode == aco_opcode::s_setpc_b64) { + /* Do not abort if the main FS has an epilog because it only + * exports MRTZ (if present) and the epilog exports colors. + */ + exported |= program->stage.hw == HWStage::FS && program->info.ps.has_epilog; + } ++it; } } -- 2.7.4