diff options
| author | 2021-03-26 16:02:04 +0100 | |
|---|---|---|
| committer | 2021-07-22 21:51:24 -0400 | |
| commit | 742d11c2ad948c8630be15901514ec9e5e5fcd20 (patch) | |
| tree | 4d9e0976f8c95fbb5c8006b46579200315b04f0f /src/shader_recompiler/frontend/ir/microinstruction.h | |
| parent | shader: Fix Array Indices in TEX/TLD4 (diff) | |
| download | yuzu-742d11c2ad948c8630be15901514ec9e5e5fcd20.tar.gz yuzu-742d11c2ad948c8630be15901514ec9e5e5fcd20.tar.xz yuzu-742d11c2ad948c8630be15901514ec9e5e5fcd20.zip | |
shader: Implement TLD4.PTP
Diffstat (limited to 'src/shader_recompiler/frontend/ir/microinstruction.h')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/microinstruction.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/microinstruction.h b/src/shader_recompiler/frontend/ir/microinstruction.h index 770bbd550..77296cfa4 100644 --- a/src/shader_recompiler/frontend/ir/microinstruction.h +++ b/src/shader_recompiler/frontend/ir/microinstruction.h | |||
| @@ -99,6 +99,12 @@ public: | |||
| 99 | return ret; | 99 | return ret; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | template <typename FlagsType> | ||
| 103 | requires(sizeof(FlagsType) <= sizeof(u32) && std::is_trivially_copyable_v<FlagsType>) | ||
| 104 | [[nodiscard]] void SetFlags(FlagsType& new_val) noexcept { | ||
| 105 | std::memcpy(&flags, &new_val, sizeof(new_val)); | ||
| 106 | } | ||
| 107 | |||
| 102 | /// Intrusively store the host definition of this instruction. | 108 | /// Intrusively store the host definition of this instruction. |
| 103 | template <typename DefinitionType> | 109 | template <typename DefinitionType> |
| 104 | void SetDefinition(DefinitionType def) { | 110 | void SetDefinition(DefinitionType def) { |