From e7ac5a6adf397b64d4ca3f29726c44c77faa3558 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 8 Mar 2019 04:06:54 -0300 Subject: dma_pusher: Store command_list_header by copy Instead of holding a reference that will get invalidated by dma_pushbuffer.pop(), hold it as a copy. This doesn't have any performance cost since CommandListHeader is 8 bytes long. --- src/video_core/dma_pusher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp index 669541b4b..bff1a37ff 100644 --- a/src/video_core/dma_pusher.cpp +++ b/src/video_core/dma_pusher.cpp @@ -39,7 +39,7 @@ bool DmaPusher::Step() { } const CommandList& command_list{dma_pushbuffer.front()}; - 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_put = dma_get + command_list_header.size * sizeof(u32); bool non_main = command_list_header.is_non_main; -- cgit v1.2.3