Mesa (main): aco: do not abort if the FS doesn't export anything but has an epilog
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 18 19:05:12 UTC 2022
Module: Mesa
Branch: main
Commit: 2784bfe93fdbf72d63dcbcd08b883e6ad8bccc36
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2784bfe93fdbf72d63dcbcd08b883e6ad8bccc36
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Fri Jun 24 14:39:10 2022 +0200
aco: do not abort if the FS doesn't export anything but has an epilog
The main fragment shader can only export MRTZ (if present) and the
epilog will export colors.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17485>
---
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 0a6feff5f4b..e6b820a2a81 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<uint32_t>& 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;
}
}
More information about the mesa-commit
mailing list