diff options
Diffstat (limited to '')
3 files changed, 56 insertions, 4 deletions
diff --git a/src/shader_recompiler/CMakeLists.txt b/src/shader_recompiler/CMakeLists.txt index 7b9f08aa0..8c24c1377 100644 --- a/src/shader_recompiler/CMakeLists.txt +++ b/src/shader_recompiler/CMakeLists.txt | |||
| @@ -120,6 +120,7 @@ add_library(shader_recompiler STATIC | |||
| 120 | frontend/maxwell/translate/impl/integer_shift_right.cpp | 120 | frontend/maxwell/translate/impl/integer_shift_right.cpp |
| 121 | frontend/maxwell/translate/impl/integer_short_multiply_add.cpp | 121 | frontend/maxwell/translate/impl/integer_short_multiply_add.cpp |
| 122 | frontend/maxwell/translate/impl/integer_to_integer_conversion.cpp | 122 | frontend/maxwell/translate/impl/integer_to_integer_conversion.cpp |
| 123 | frontend/maxwell/translate/impl/internal_stage_buffer_entry_read.cpp | ||
| 123 | frontend/maxwell/translate/impl/load_constant.cpp | 124 | frontend/maxwell/translate/impl/load_constant.cpp |
| 124 | frontend/maxwell/translate/impl/load_constant.h | 125 | frontend/maxwell/translate/impl/load_constant.h |
| 125 | frontend/maxwell/translate/impl/load_effective_address.cpp | 126 | frontend/maxwell/translate/impl/load_effective_address.cpp |
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/internal_stage_buffer_entry_read.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/internal_stage_buffer_entry_read.cpp new file mode 100644 index 000000000..8c01b7d30 --- /dev/null +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/internal_stage_buffer_entry_read.cpp | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "common/bit_field.h" | ||
| 6 | #include "common/common_types.h" | ||
| 7 | #include "shader_recompiler/frontend/maxwell/translate/impl/impl.h" | ||
| 8 | |||
| 9 | #pragma optimize("", off) | ||
| 10 | |||
| 11 | namespace Shader::Maxwell { | ||
| 12 | namespace { | ||
| 13 | enum class Mode : u64 { | ||
| 14 | Default, | ||
| 15 | Patch, | ||
| 16 | Prim, | ||
| 17 | Attr, | ||
| 18 | }; | ||
| 19 | |||
| 20 | enum class Shift : u64 { | ||
| 21 | Default, | ||
| 22 | U16, | ||
| 23 | B32, | ||
| 24 | }; | ||
| 25 | |||
| 26 | } // Anonymous namespace | ||
| 27 | |||
| 28 | void TranslatorVisitor::ISBERD(u64 insn) { | ||
| 29 | union { | ||
| 30 | u64 raw; | ||
| 31 | BitField<0, 8, IR::Reg> dest_reg; | ||
| 32 | BitField<8, 8, IR::Reg> src_reg; | ||
| 33 | BitField<31, 1, u64> skew; | ||
| 34 | BitField<32, 1, u64> o; | ||
| 35 | BitField<33, 2, Mode> mode; | ||
| 36 | BitField<47, 2, Shift> shift; | ||
| 37 | } const isberd{insn}; | ||
| 38 | |||
| 39 | if (isberd.skew != 0) { | ||
| 40 | throw NotImplementedException("SKEW"); | ||
| 41 | } | ||
| 42 | if (isberd.o != 0) { | ||
| 43 | throw NotImplementedException("O"); | ||
| 44 | } | ||
| 45 | if (isberd.mode != Mode::Default) { | ||
| 46 | throw NotImplementedException("Mode {}", isberd.mode.Value()); | ||
| 47 | } | ||
| 48 | if (isberd.shift != Shift::Default) { | ||
| 49 | throw NotImplementedException("Shift {}", isberd.shift.Value()); | ||
| 50 | } | ||
| 51 | // LOG_WARNING(..., "ISBERD is stubbed"); | ||
| 52 | X(isberd.dest_reg, X(isberd.src_reg)); | ||
| 53 | } | ||
| 54 | |||
| 55 | } // namespace Shader::Maxwell | ||
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp index aebe3072a..694bdfccb 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp | |||
| @@ -141,10 +141,6 @@ void TranslatorVisitor::IMUL32I(u64) { | |||
| 141 | ThrowNotImplemented(Opcode::IMUL32I); | 141 | ThrowNotImplemented(Opcode::IMUL32I); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | void TranslatorVisitor::ISBERD(u64) { | ||
| 145 | ThrowNotImplemented(Opcode::ISBERD); | ||
| 146 | } | ||
| 147 | |||
| 148 | void TranslatorVisitor::JCAL(u64) { | 144 | void TranslatorVisitor::JCAL(u64) { |
| 149 | ThrowNotImplemented(Opcode::JCAL); | 145 | ThrowNotImplemented(Opcode::JCAL); |
| 150 | } | 146 | } |