diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-03-15 08:54:43 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:23 +0200 |
commit | 17a82b56d74afcebaad78ce4754d8ee99ea66f93 (patch) | |
tree | 5a4a29a65ee09599daa3b9c4a005070286d6b901 /src/shader_recompiler/frontend/ir | |
parent | shader: Implement CAL inlining function calls (diff) | |
download | yuzu-17a82b56d74afcebaad78ce4754d8ee99ea66f93.tar yuzu-17a82b56d74afcebaad78ce4754d8ee99ea66f93.tar.gz yuzu-17a82b56d74afcebaad78ce4754d8ee99ea66f93.tar.bz2 yuzu-17a82b56d74afcebaad78ce4754d8ee99ea66f93.tar.lz yuzu-17a82b56d74afcebaad78ce4754d8ee99ea66f93.tar.xz yuzu-17a82b56d74afcebaad78ce4754d8ee99ea66f93.tar.zst yuzu-17a82b56d74afcebaad78ce4754d8ee99ea66f93.zip |
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
-rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.cpp | 8 | ||||
-rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.h | 3 | ||||
-rw-r--r-- | src/shader_recompiler/frontend/ir/modifiers.h | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp index 556961fa4..d94596ee9 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp +++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp @@ -512,6 +512,14 @@ Value IREmitter::UnpackFloat2x16(const U32& value) { return Inst(Opcode::UnpackFloat2x16, value); } +U32 IREmitter::PackHalf2x16(const Value& vector) { + return Inst<U32>(Opcode::PackHalf2x16, vector); +} + +Value IREmitter::UnpackHalf2x16(const U32& value) { + return Inst(Opcode::UnpackHalf2x16, value); +} + F64 IREmitter::PackDouble2x32(const Value& vector) { return Inst<F64>(Opcode::PackDouble2x32, vector); } diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h index 74fb3dbcb..27ff5a29d 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.h +++ b/src/shader_recompiler/frontend/ir/ir_emitter.h @@ -115,6 +115,9 @@ public: [[nodiscard]] U32 PackFloat2x16(const Value& vector); [[nodiscard]] Value UnpackFloat2x16(const U32& value); + [[nodiscard]] U32 PackHalf2x16(const Value& vector); + [[nodiscard]] Value UnpackHalf2x16(const U32& value); + [[nodiscard]] F64 PackDouble2x32(const Value& vector); [[nodiscard]] Value UnpackDouble2x32(const F64& value); diff --git a/src/shader_recompiler/frontend/ir/modifiers.h b/src/shader_recompiler/frontend/ir/modifiers.h index ad07700ae..308c00153 100644 --- a/src/shader_recompiler/frontend/ir/modifiers.h +++ b/src/shader_recompiler/frontend/ir/modifiers.h @@ -36,7 +36,8 @@ union TextureInstInfo { u32 raw; BitField<0, 8, TextureType> type; BitField<8, 1, u32> has_bias; - BitField<16, 1, u32> has_lod_clamp; + BitField<9, 1, u32> has_lod_clamp; + BitField<10, 1, u32> relaxed_precision; }; static_assert(sizeof(TextureInstInfo) <= sizeof(u32)); |