summaryrefslogtreecommitdiffstats
path: root/src/video_core/dma_pusher.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-22 07:47:56 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-02-03 08:58:40 +0100
commit2bdbb90af74683bd8bb7e25d5353c39fb8037f8c (patch)
tree443865c07c307ddc4ac41e82387395bde95641e6 /src/video_core/dma_pusher.cpp
parentmaxwell_3d: Allow sampler handles with TSC id zero (diff)
downloadyuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar
yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.gz
yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.bz2
yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.lz
yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.xz
yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.zst
yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/dma_pusher.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp
index 63a958f11..eb9bf1878 100644
--- a/src/video_core/dma_pusher.cpp
+++ b/src/video_core/dma_pusher.cpp
@@ -35,8 +35,10 @@ void DmaPusher::DispatchCalls() {
bool DmaPusher::Step() {
if (dma_get != dma_put) {
// Push buffer non-empty, read a word
- const CommandHeader command_header{
- Memory::Read32(*gpu.MemoryManager().GpuToCpuAddress(dma_get))};
+ const auto address = gpu.MemoryManager().GpuToCpuAddress(dma_get);
+ ASSERT_MSG(address, "Invalid GPU address");
+
+ const CommandHeader command_header{Memory::Read32(*address)};
dma_get += sizeof(u32);