Skip to content
Snippets Groups Projects
Commit 9e98100c authored by Fernando Sahmkow's avatar Fernando Sahmkow Committed by FernandoS27
Browse files

Dma_pusher: ASSERT on empty command_list

This is a measure to avoid crashes on command list reading as an empty
command_list is considered a NOP.
parent fb85d567
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,13 @@ bool DmaPusher::Step() {
}
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++]};
GPUVAddr dma_get = command_list_header.addr;
GPUVAddr dma_put = dma_get + command_list_header.size * sizeof(u32);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment