diff options
Diffstat (limited to 'src/shader_recompiler/program_header.h')
-rw-r--r-- | src/shader_recompiler/program_header.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/shader_recompiler/program_header.h b/src/shader_recompiler/program_header.h index bd6c2bfb5..1e8bae7cd 100644 --- a/src/shader_recompiler/program_header.h +++ b/src/shader_recompiler/program_header.h @@ -1,6 +1,5 @@ -// Copyright 2018 yuzu Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -196,6 +195,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 & 0xf) != 0; + } + [[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}; |