From bb0e64caf5afabd2cb617fe255ddca0068d15d98 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Thu, 15 Jan 2026 00:06:48 -0400 Subject: [PATCH] Revert "[engines, maxwell] Added GetDirtyFlagsForMethod" --- src/video_core/dirty_flags.h | 7 ++----- src/video_core/engines/maxwell_3d.cpp | 5 ++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/video_core/dirty_flags.h b/src/video_core/dirty_flags.h index 879d207112..e6dcff3fbc 100644 --- a/src/video_core/dirty_flags.h +++ b/src/video_core/dirty_flags.h @@ -1,6 +1,3 @@ -// SDPX-FileCopyrightText: Copyright 2025 Eden Emulator Project -// SPDX-License-Identifier: GPL-3.0-or-later - // SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -85,8 +82,8 @@ constexpr std::pair GetDirtyFlagsForMethod(u32 method) { return {Descriptors, NullEntry}; } - if (method >= OFF_RT && method < OFF_RT + 32) { - const u32 rt_idx = (method - OFF_RT) / 4; + if (method >= OFF_RT && method < OFF_RT + 64) { + const u32 rt_idx = (method - OFF_RT) / 8; return {static_cast(ColorBuffer0 + rt_idx), RenderTargets}; } diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 509823d0db..14117b644b 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -324,7 +324,10 @@ void Maxwell3D::ProcessDirtyRegisters(u32 method, u32 argument) { } regs.reg_array[method] = argument; - const auto [flag0, flag1] = GetDirtyFlagsForMethod(method); + const auto& table0 = dirty.tables[0]; + const auto& table1 = dirty.tables[1]; + const u8 flag0 = table0[method]; + const u8 flag1 = table1[method]; dirty.flags[flag0] = true; if (flag1 != flag0) { dirty.flags[flag1] = true;