diff options
| author | 2019-03-08 04:06:54 -0300 | |
|---|---|---|
| committer | 2019-03-08 04:06:54 -0300 | |
| commit | e7ac5a6adf397b64d4ca3f29726c44c77faa3558 (patch) | |
| tree | d5e840c8756ca5270e54bf66bcbe328c04be2c5a /src | |
| parent | Merge pull request #2195 from lioncash/shared-global (diff) | |
| download | yuzu-e7ac5a6adf397b64d4ca3f29726c44c77faa3558.tar.gz yuzu-e7ac5a6adf397b64d4ca3f29726c44c77faa3558.tar.xz yuzu-e7ac5a6adf397b64d4ca3f29726c44c77faa3558.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/dma_pusher.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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() { | |||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | const CommandList& command_list{dma_pushbuffer.front()}; | 41 | const CommandList& command_list{dma_pushbuffer.front()}; |
| 42 | const CommandListHeader& command_list_header{command_list[dma_pushbuffer_subindex++]}; | 42 | const CommandListHeader command_list_header{command_list[dma_pushbuffer_subindex++]}; |
| 43 | GPUVAddr dma_get = command_list_header.addr; | 43 | GPUVAddr dma_get = command_list_header.addr; |
| 44 | GPUVAddr dma_put = dma_get + command_list_header.size * sizeof(u32); | 44 | GPUVAddr dma_put = dma_get + command_list_header.size * sizeof(u32); |
| 45 | bool non_main = command_list_header.is_non_main; | 45 | bool non_main = command_list_header.is_non_main; |