aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/dma_pusher.cpp
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2026-05-27 00:04:27 +0200
committercrueter <crueter@eden-emu.dev>2026-05-27 00:04:27 +0200
commit8fd495f906f03e59cdc3e68ec33d0b9b6f257427 (patch)
tree6da117de872abe3258858f4eb1aa8a5f66e3c20c /src/video_core/dma_pusher.cpp
parent9d55875377f4060592313f5db8d618f1f735a20f (diff)
[video_core] fix std::bitset<> dirty tracker OOB, fix slightly wrong index format estimate (#4006)
u8 may have been 0xff, (aka. 255), but bitset was only 255 elements, so doing bitset[255] is technically OOB additionally the max size estimate for index formats was not correct, there can be up to 256 elements with a u8 format index, not just 255 Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4006 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/video_core/dma_pusher.cpp')
-rw-r--r--src/video_core/dma_pusher.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp
index f98e20171a..8a7798e035 100644
--- a/src/video_core/dma_pusher.cpp
+++ b/src/video_core/dma_pusher.cpp
@@ -181,12 +181,12 @@ void DmaPusher::CallMethod(u32 argument) const {
});
} else {
auto subchannel = subchannels[dma_state.subchannel];
- if (!subchannel->execution_mask[dma_state.method]) {
- subchannel->method_sink.emplace_back(dma_state.method, argument);
- } else {
+ if (subchannel->execution_mask[dma_state.method]) {
subchannel->ConsumeSink();
subchannel->current_dma_segment = dma_state.dma_get + dma_state.dma_word_offset;
subchannel->CallMethod(dma_state.method, argument, dma_state.is_last_call);
+ } else {
+ subchannel->method_sink.emplace_back(dma_state.method, argument);
}
}
}