diff options
| author | 2019-01-22 03:47:56 -0300 | |
|---|---|---|
| committer | 2019-02-03 04:58:40 -0300 | |
| commit | 2bdbb90af74683bd8bb7e25d5353c39fb8037f8c (patch) | |
| tree | 443865c07c307ddc4ac41e82387395bde95641e6 /src/video_core/dma_pusher.cpp | |
| parent | maxwell_3d: Allow sampler handles with TSC id zero (diff) | |
| download | yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.gz yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.tar.xz yuzu-2bdbb90af74683bd8bb7e25d5353c39fb8037f8c.zip | |
video_core: Assert on invalid GPU to CPU address queries
Diffstat (limited to 'src/video_core/dma_pusher.cpp')
| -rw-r--r-- | src/video_core/dma_pusher.cpp | 6 |
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() { | |||
| 35 | bool DmaPusher::Step() { | 35 | bool DmaPusher::Step() { |
| 36 | if (dma_get != dma_put) { | 36 | if (dma_get != dma_put) { |
| 37 | // Push buffer non-empty, read a word | 37 | // Push buffer non-empty, read a word |
| 38 | const CommandHeader command_header{ | 38 | const auto address = gpu.MemoryManager().GpuToCpuAddress(dma_get); |
| 39 | Memory::Read32(*gpu.MemoryManager().GpuToCpuAddress(dma_get))}; | 39 | ASSERT_MSG(address, "Invalid GPU address"); |
| 40 | |||
| 41 | const CommandHeader command_header{Memory::Read32(*address)}; | ||
| 40 | 42 | ||
| 41 | dma_get += sizeof(u32); | 43 | dma_get += sizeof(u32); |
| 42 | 44 | ||