summaryrefslogtreecommitdiffstats
path: root/src/video_core/dma_pusher.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2022-02-09 15:39:40 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-01-01 22:43:57 +0100
commit0f89828073a541eaa2cfd985483f839bd2f97b74 (patch)
tree3e26c71678e17ca97ec744a884f5ecb9ae2b6c5e /src/video_core/dma_pusher.cpp
parentMacroHLE: Add MultidrawIndirect HLE Macro. (diff)
downloadyuzu-0f89828073a541eaa2cfd985483f839bd2f97b74.tar
yuzu-0f89828073a541eaa2cfd985483f839bd2f97b74.tar.gz
yuzu-0f89828073a541eaa2cfd985483f839bd2f97b74.tar.bz2
yuzu-0f89828073a541eaa2cfd985483f839bd2f97b74.tar.lz
yuzu-0f89828073a541eaa2cfd985483f839bd2f97b74.tar.xz
yuzu-0f89828073a541eaa2cfd985483f839bd2f97b74.tar.zst
yuzu-0f89828073a541eaa2cfd985483f839bd2f97b74.zip
Diffstat (limited to 'src/video_core/dma_pusher.cpp')
-rw-r--r--src/video_core/dma_pusher.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp
index eb1371612..13ff64fa3 100644
--- a/src/video_core/dma_pusher.cpp
+++ b/src/video_core/dma_pusher.cpp
@@ -97,6 +97,7 @@ void DmaPusher::ProcessCommands(std::span<const CommandHeader> commands) {
if (dma_state.non_incrementing) {
const u32 max_write = static_cast<u32>(
std::min<std::size_t>(index + dma_state.method_count, commands.size()) - index);
+ dma_state.dma_word_offset = static_cast<u32>(index * sizeof(u32));
CallMultiMethod(&command_header.argument, max_write);
dma_state.method_count -= max_write;
dma_state.is_last_call = true;
@@ -175,7 +176,7 @@ void DmaPusher::CallMultiMethod(const u32* base_start, u32 num_methods) const {
dma_state.method_count);
} else {
auto subchannel = subchannels[dma_state.subchannel];
- subchannel->current_dma_segment = dma_state.dma_get;
+ subchannel->current_dma_segment = dma_state.dma_get + dma_state.dma_word_offset;
subchannel->CallMultiMethod(dma_state.method, base_start, num_methods,
dma_state.method_count);
}