mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 03:18:55 +02:00
[video_core] Fix Maxwell3D register processing to always mark dirty flags (#3712)
Removed the early return in ProcessDirtyRegisters to ensure all dependent dirty flags are set even if the register value hasn't changed. This fixes flickering and vertex explosions on the Hero's Path in The Legend of Zelda: Breath of the Wild, fixes the teleport bug in The Legend of Zelda: Tears of the Kingdom, fixes the grey Luigi in Luigi's Mansion 3, and may also improve rendering in other games that rely on redundant register writes. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3712 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
This commit is contained in:
parent
f0a4ac7359
commit
af554c0baa
1 changed files with 4 additions and 9 deletions
|
|
@ -315,15 +315,10 @@ void Maxwell3D::ConsumeSinkImpl() {
|
|||
}
|
||||
|
||||
void Maxwell3D::ProcessDirtyRegisters(u32 method, u32 argument) {
|
||||
if (regs.reg_array[method] != argument) {
|
||||
regs.reg_array[method] = argument;
|
||||
auto const& table0 = dirty.tables[0];
|
||||
auto const& table1 = dirty.tables[1];
|
||||
u8 const flag0 = table0[method];
|
||||
u8 const flag1 = table1[method];
|
||||
dirty.flags[flag0] = true;
|
||||
if (flag1 != flag0)
|
||||
dirty.flags[flag1] = true;
|
||||
regs.reg_array[method] = argument;
|
||||
|
||||
for (const auto& table : dirty.tables) {
|
||||
dirty.flags[table[method]] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue