summaryrefslogtreecommitdiff
path: root/src/video_core/macro
diff options
context:
space:
mode:
authorGravatar Narr the Reg2022-11-20 09:31:20 -0600
committerGravatar GitHub2022-11-20 09:31:20 -0600
commitdb7bcd51ae09c4ef25e08096de563903f61e2380 (patch)
tree5ae9977b48e1aff118fae3ebffb215b0b4afa887 /src/video_core/macro
parentservice: nfc: Implement nfc user (diff)
parentMerge pull request #9238 from german77/cabinet_applet (diff)
downloadyuzu-db7bcd51ae09c4ef25e08096de563903f61e2380.tar.gz
yuzu-db7bcd51ae09c4ef25e08096de563903f61e2380.tar.xz
yuzu-db7bcd51ae09c4ef25e08096de563903f61e2380.zip
Merge branch 'master' into nfc_impl
Diffstat (limited to 'src/video_core/macro')
-rw-r--r--src/video_core/macro/macro_hle.cpp16
-rw-r--r--src/video_core/macro/macro_interpreter.cpp2
-rw-r--r--src/video_core/macro/macro_jit_x64.cpp1
3 files changed, 18 insertions, 1 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp
index f896591bf..0f3262edb 100644
--- a/src/video_core/macro/macro_hle.cpp
+++ b/src/video_core/macro/macro_hle.cpp
@@ -126,11 +126,25 @@ void HLE_3F5E74B9C9A50164(Engines::Maxwell3D& maxwell3d, const std::vector<u32>&
126 } 126 }
127} 127}
128 128
129constexpr std::array<std::pair<u64, HLEFunction>, 4> hle_funcs{{ 129// Multi-layer Clear
130void HLE_EAD26C3E2109B06B(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& parameters) {
131 ASSERT(parameters.size() == 1);
132
133 const Engines::Maxwell3D::Regs::ClearSurface clear_params{parameters[0]};
134 const u32 rt_index = clear_params.RT;
135 const u32 num_layers = maxwell3d.regs.rt[rt_index].depth;
136 ASSERT(clear_params.layer == 0);
137
138 maxwell3d.regs.clear_surface.raw = clear_params.raw;
139 maxwell3d.ProcessClearBuffers(num_layers);
140}
141
142constexpr std::array<std::pair<u64, HLEFunction>, 5> hle_funcs{{
130 {0x771BB18C62444DA0, &HLE_771BB18C62444DA0}, 143 {0x771BB18C62444DA0, &HLE_771BB18C62444DA0},
131 {0x0D61FC9FAAC9FCAD, &HLE_0D61FC9FAAC9FCAD}, 144 {0x0D61FC9FAAC9FCAD, &HLE_0D61FC9FAAC9FCAD},
132 {0x0217920100488FF7, &HLE_0217920100488FF7}, 145 {0x0217920100488FF7, &HLE_0217920100488FF7},
133 {0x3F5E74B9C9A50164, &HLE_3F5E74B9C9A50164}, 146 {0x3F5E74B9C9A50164, &HLE_3F5E74B9C9A50164},
147 {0xEAD26C3E2109B06B, &HLE_EAD26C3E2109B06B},
134}}; 148}};
135 149
136class HLEMacroImpl final : public CachedMacro { 150class HLEMacroImpl final : public CachedMacro {
diff --git a/src/video_core/macro/macro_interpreter.cpp b/src/video_core/macro/macro_interpreter.cpp
index c0d32c112..0d63495a9 100644
--- a/src/video_core/macro/macro_interpreter.cpp
+++ b/src/video_core/macro/macro_interpreter.cpp
@@ -201,6 +201,7 @@ bool MacroInterpreterImpl::Step(bool is_delay_slot) {
201 } 201 }
202 default: 202 default:
203 UNIMPLEMENTED_MSG("Unimplemented macro operation {}", opcode.operation.Value()); 203 UNIMPLEMENTED_MSG("Unimplemented macro operation {}", opcode.operation.Value());
204 break;
204 } 205 }
205 206
206 // An instruction with the Exit flag will not actually 207 // An instruction with the Exit flag will not actually
@@ -297,6 +298,7 @@ void MacroInterpreterImpl::ProcessResult(Macro::ResultOperation operation, u32 r
297 break; 298 break;
298 default: 299 default:
299 UNIMPLEMENTED_MSG("Unimplemented result operation {}", operation); 300 UNIMPLEMENTED_MSG("Unimplemented result operation {}", operation);
301 break;
300 } 302 }
301} 303}
302 304
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp
index 25c1ce798..7347cbd88 100644
--- a/src/video_core/macro/macro_jit_x64.cpp
+++ b/src/video_core/macro/macro_jit_x64.cpp
@@ -652,6 +652,7 @@ void MacroJITx64Impl::Compile_ProcessResult(Macro::ResultOperation operation, u3
652 break; 652 break;
653 default: 653 default:
654 UNIMPLEMENTED_MSG("Unimplemented macro operation {}", operation); 654 UNIMPLEMENTED_MSG("Unimplemented macro operation {}", operation);
655 break;
655 } 656 }
656} 657}
657 658