summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/program_header.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-03-18 14:26:25 +0100
committerLiam <byteslice@airmail.cc>2022-03-18 14:26:25 +0100
commitd400b618a76ab0b08adfcb808ca8a8e336e1d573 (patch)
tree495f1f53bd24b2190d0a5c23d9ecafd4f2d38985 /src/shader_recompiler/program_header.h
parentshader_recompiler/EXIT: increment output register on failed enable test (diff)
downloadyuzu-d400b618a76ab0b08adfcb808ca8a8e336e1d573.tar
yuzu-d400b618a76ab0b08adfcb808ca8a8e336e1d573.tar.gz
yuzu-d400b618a76ab0b08adfcb808ca8a8e336e1d573.tar.bz2
yuzu-d400b618a76ab0b08adfcb808ca8a8e336e1d573.tar.lz
yuzu-d400b618a76ab0b08adfcb808ca8a8e336e1d573.tar.xz
yuzu-d400b618a76ab0b08adfcb808ca8a8e336e1d573.tar.zst
yuzu-d400b618a76ab0b08adfcb808ca8a8e336e1d573.zip
Diffstat (limited to 'src/shader_recompiler/program_header.h')
-rw-r--r--src/shader_recompiler/program_header.h5
1 files changed, 5 insertions, 0 deletions
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<PixelImap, 4> GenericInputMap(u32 attribute) const {
const auto& vector{imap_generic_vector[attribute]};
return {vector.x, vector.y, vector.z, vector.w};