mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-19 04:53:06 +00:00
Merge pull request #2491 from FernandoS27/dma-fix
Dma_pusher: ASSERT on empty command_list
This commit is contained in:
commit
b94b08fa6f
1 changed files with 7 additions and 0 deletions
|
@ -40,6 +40,13 @@ bool DmaPusher::Step() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const CommandList& command_list{dma_pushbuffer.front()};
|
const CommandList& command_list{dma_pushbuffer.front()};
|
||||||
|
ASSERT_OR_EXECUTE(!command_list.empty(), {
|
||||||
|
// Somehow the command_list is empty, in order to avoid a crash
|
||||||
|
// We ignore it and assume its size is 0.
|
||||||
|
dma_pushbuffer.pop();
|
||||||
|
dma_pushbuffer_subindex = 0;
|
||||||
|
return true;
|
||||||
|
});
|
||||||
const CommandListHeader command_list_header{command_list[dma_pushbuffer_subindex++]};
|
const CommandListHeader command_list_header{command_list[dma_pushbuffer_subindex++]};
|
||||||
GPUVAddr dma_get = command_list_header.addr;
|
GPUVAddr dma_get = command_list_header.addr;
|
||||||
GPUVAddr dma_put = dma_get + command_list_header.size * sizeof(u32);
|
GPUVAddr dma_put = dma_get + command_list_header.size * sizeof(u32);
|
||||||
|
|
Loading…
Reference in a new issue