aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/engines/kepler_compute.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/engines/kepler_compute.cpp')
-rw-r--r--src/video_core/engines/kepler_compute.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/video_core/engines/kepler_compute.cpp b/src/video_core/engines/kepler_compute.cpp
index 96a12539a2..166bbd6d53 100644
--- a/src/video_core/engines/kepler_compute.cpp
+++ b/src/video_core/engines/kepler_compute.cpp
@@ -35,13 +35,24 @@ void KeplerCompute::BindRasterizer(VideoCore::RasterizerInterface* rasterizer_)
void KeplerCompute::ConsumeSinkImpl(Core::System& system) {
for (auto [method, value] : method_sink) {
- regs.reg_array[method] = value;
+ if (method < Regs::NUM_REGS) {
+ regs.reg_array[method] = value;
+ }
}
method_sink.clear();
}
void KeplerCompute::CallMethod(Core::System& system, u32 method, u32 method_argument, bool is_last_call) {
- ASSERT_MSG(method < Regs::NUM_REGS, "Invalid KeplerCompute register, increase the size of the Regs structure");
+ if (method >= Regs::NUM_REGS) {
+ // Ampere compute (Switch 2) uses methods past Kepler's register file; writing them would
+ // run off reg_array, so drop them.
+ static bool reported = false;
+ if (!reported) {
+ reported = true;
+ LOG_WARNING(HW_GPU, "Ignoring KeplerCompute method {:#x} past the register file", method);
+ }
+ return;
+ }
regs.reg_array[method] = method_argument;