diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-11-18 00:21:13 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-01-01 22:43:57 +0100 |
commit | ce448ce770b6c329caec7ad1ae00e01dddb67b03 (patch) | |
tree | 88a76a0416244c89d1031551b1a419a606324004 /src/video_core/dma_pusher.cpp | |
parent | MacroHLE: Reduce massive calculations on sizing estimation. (diff) | |
download | yuzu-ce448ce770b6c329caec7ad1ae00e01dddb67b03.tar yuzu-ce448ce770b6c329caec7ad1ae00e01dddb67b03.tar.gz yuzu-ce448ce770b6c329caec7ad1ae00e01dddb67b03.tar.bz2 yuzu-ce448ce770b6c329caec7ad1ae00e01dddb67b03.tar.lz yuzu-ce448ce770b6c329caec7ad1ae00e01dddb67b03.tar.xz yuzu-ce448ce770b6c329caec7ad1ae00e01dddb67b03.tar.zst yuzu-ce448ce770b6c329caec7ad1ae00e01dddb67b03.zip |
Diffstat (limited to 'src/video_core/dma_pusher.cpp')
-rw-r--r-- | src/video_core/dma_pusher.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp index 7a82355da..b3e9cb82e 100644 --- a/src/video_core/dma_pusher.cpp +++ b/src/video_core/dma_pusher.cpp @@ -77,11 +77,20 @@ bool DmaPusher::Step() { command_headers.resize_destructive(command_list_header.size); constexpr u32 MacroRegistersStart = 0xE00; if (dma_state.method < MacroRegistersStart) { - memory_manager.ReadBlock(dma_state.dma_get, command_headers.data(), - command_list_header.size * sizeof(u32)); + if (Settings::IsGPULevelHigh()) { + memory_manager.ReadBlock(dma_state.dma_get, command_headers.data(), + command_list_header.size * sizeof(u32)); + } else { + memory_manager.ReadBlockUnsafe(dma_state.dma_get, command_headers.data(), + command_list_header.size * sizeof(u32)); + } } else { - memory_manager.ReadBlockUnsafe(dma_state.dma_get, command_headers.data(), - command_list_header.size * sizeof(u32)); + const size_t copy_size = command_list_header.size * sizeof(u32); + if (subchannels[dma_state.subchannel]) { + subchannels[dma_state.subchannel]->current_dirty = + memory_manager.IsMemoryDirty(dma_state.dma_get, copy_size); + } + memory_manager.ReadBlockUnsafe(dma_state.dma_get, command_headers.data(), copy_size); } ProcessCommands(command_headers); } |