mirror of https://git.suyu.dev/suyu/suyu
perf(VideoCore): Refactor DispatchIndirect
- Added automatic safe or unsafe processing for better emulation accuracy.
ref: 8cae0310e3
This commit is contained in:
parent
154aab7c4b
commit
247f61e1f9
|
@ -76,13 +76,7 @@ bool DmaPusher::Step() {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Push buffer non-empty, read a word
|
||||
if (dma_state.method >= MacroRegistersStart) {
|
||||
if (subchannels[dma_state.subchannel]) {
|
||||
subchannels[dma_state.subchannel]->current_dirty = memory_manager.IsMemoryDirty(
|
||||
dma_state.dma_get, command_list_header.size * sizeof(u32));
|
||||
}
|
||||
}
|
||||
// Determine whether to use safe or unsafe processing
|
||||
const auto safe_process = [&] {
|
||||
Tegra::Memory::GpuGuestMemory<Tegra::CommandHeader,
|
||||
Tegra::Memory::GuestMemoryFlags::SafeRead>
|
||||
|
@ -90,6 +84,7 @@ bool DmaPusher::Step() {
|
|||
&command_headers);
|
||||
ProcessCommands(headers);
|
||||
};
|
||||
|
||||
const auto unsafe_process = [&] {
|
||||
Tegra::Memory::GpuGuestMemory<Tegra::CommandHeader,
|
||||
Tegra::Memory::GuestMemoryFlags::UnsafeRead>
|
||||
|
@ -97,14 +92,13 @@ bool DmaPusher::Step() {
|
|||
&command_headers);
|
||||
ProcessCommands(headers);
|
||||
};
|
||||
if (Settings::IsGPULevelHigh()) {
|
||||
if (dma_state.method >= MacroRegistersStart) {
|
||||
unsafe_process();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Settings::IsGPULevelHigh() || (dma_state.method >= MacroRegistersStart)) {
|
||||
|
||||
safe_process();
|
||||
return true;
|
||||
}
|
||||
|
||||
unsafe_process();
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue