diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-08-27 02:58:00 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-08-27 04:26:22 +0200 |
commit | 115792158d3ac4ca746d1775f2381e8f8dd18582 (patch) | |
tree | fec8995dd2a887068625e9d1278d0562bee6a8cb /src/video_core/dma_pusher.cpp | |
parent | Shader Recompiler: Auto stub special registers and dump pipelines on exception. (diff) | |
download | yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.gz yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.bz2 yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.lz yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.xz yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.tar.zst yuzu-115792158d3ac4ca746d1775f2381e8f8dd18582.zip |
Diffstat (limited to 'src/video_core/dma_pusher.cpp')
-rw-r--r-- | src/video_core/dma_pusher.cpp | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp index ab28951b6..58ce0d8c2 100644 --- a/src/video_core/dma_pusher.cpp +++ b/src/video_core/dma_pusher.cpp @@ -14,6 +14,7 @@ namespace Tegra { constexpr u32 MacroRegistersStart = 0xE00; +constexpr u32 ComputeInline = 0x6D; DmaPusher::DmaPusher(Core::System& system_, GPU& gpu_, MemoryManager& memory_manager_, Control::ChannelState& channel_state_) @@ -83,20 +84,35 @@ bool DmaPusher::Step() { dma_state.dma_get, command_list_header.size * sizeof(u32)); } } - if (Settings::IsGPULevelHigh() && dma_state.method < MacroRegistersStart) { + const auto safe_process = [&] { Core::Memory::GpuGuestMemory<Tegra::CommandHeader, Core::Memory::GuestMemoryFlags::SafeRead> headers(memory_manager, dma_state.dma_get, command_list_header.size, &command_headers); ProcessCommands(headers); + }; + const auto unsafe_process = [&] { + Core::Memory::GpuGuestMemory<Tegra::CommandHeader, + Core::Memory::GuestMemoryFlags::UnsafeRead> + headers(memory_manager, dma_state.dma_get, command_list_header.size, + &command_headers); + ProcessCommands(headers); + }; + if (Settings::IsGPULevelHigh()) { + if (dma_state.method >= MacroRegistersStart) { + unsafe_process(); + return true; + } + if (subchannel_type[dma_state.subchannel] == Engines::EngineTypes::KeplerCompute && + dma_state.method == ComputeInline) { + unsafe_process(); + return true; + } + safe_process(); return true; } - Core::Memory::GpuGuestMemory<Tegra::CommandHeader, - Core::Memory::GuestMemoryFlags::UnsafeRead> - headers(memory_manager, dma_state.dma_get, command_list_header.size, &command_headers); - ProcessCommands(headers); + unsafe_process(); } - return true; } |