From d400b618a76ab0b08adfcb808ca8a8e336e1d573 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 18 Mar 2022 09:26:25 -0400 Subject: shader_recompiler/EXIT: skip render targets with no outputs --- src/shader_recompiler/program_header.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/shader_recompiler/program_header.h') diff --git a/src/shader_recompiler/program_header.h b/src/shader_recompiler/program_header.h index bd6c2bfb5..5e42ab5a3 100644 --- a/src/shader_recompiler/program_header.h +++ b/src/shader_recompiler/program_header.h @@ -196,6 +196,11 @@ struct ProgramHeader { return {(bits & 1) != 0, (bits & 2) != 0, (bits & 4) != 0, (bits & 8) != 0}; } + [[nodiscard]] bool HasOutputComponents(u32 rt) const noexcept { + const u32 bits{omap.target >> (rt * 4)}; + return bits & (1 | 2 | 4 | 8); + } + [[nodiscard]] std::array GenericInputMap(u32 attribute) const { const auto& vector{imap_generic_vector[attribute]}; return {vector.x, vector.y, vector.z, vector.w}; -- cgit v1.2.3