summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend')
-rw-r--r--src/shader_recompiler/frontend/maxwell/translate/impl/internal_stage_buffer_entry_read.cpp55
-rw-r--r--src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp4
2 files changed, 55 insertions, 4 deletions
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
11namespace Shader::Maxwell {
12namespace {
13enum class Mode : u64 {
14 Default,
15 Patch,
16 Prim,
17 Attr,
18};
19
20enum class Shift : u64 {
21 Default,
22 U16,
23 B32,
24};
25
26} // Anonymous namespace
27
28void 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
144void TranslatorVisitor::ISBERD(u64) {
145 ThrowNotImplemented(Opcode::ISBERD);
146}
147
148void TranslatorVisitor::JCAL(u64) { 144void TranslatorVisitor::JCAL(u64) {
149 ThrowNotImplemented(Opcode::JCAL); 145 ThrowNotImplemented(Opcode::JCAL);
150} 146}