diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-08-21 06:55:25 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-08-21 06:55:25 +0200 |
commit | 9a76e94b3d854fadeac19a097538a24f9b3fb7b7 (patch) | |
tree | 406d375b3d95ccc95da446959a2e4d75d40b3e23 /src/video_core/gpu_thread.cpp | |
parent | Merge pull request #2747 from lioncash/audio (diff) | |
download | yuzu-9a76e94b3d854fadeac19a097538a24f9b3fb7b7.tar yuzu-9a76e94b3d854fadeac19a097538a24f9b3fb7b7.tar.gz yuzu-9a76e94b3d854fadeac19a097538a24f9b3fb7b7.tar.bz2 yuzu-9a76e94b3d854fadeac19a097538a24f9b3fb7b7.tar.lz yuzu-9a76e94b3d854fadeac19a097538a24f9b3fb7b7.tar.xz yuzu-9a76e94b3d854fadeac19a097538a24f9b3fb7b7.tar.zst yuzu-9a76e94b3d854fadeac19a097538a24f9b3fb7b7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/gpu_thread.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index b441e92b0..5f039e4fd 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp @@ -39,7 +39,7 @@ static void RunThread(VideoCore::RendererBase& renderer, Tegra::DmaPusher& dma_p dma_pusher.Push(std::move(submit_list->entries)); dma_pusher.DispatchCalls(); } else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) { - renderer.SwapBuffers(std::move(data->framebuffer)); + renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); } else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) { renderer.Rasterizer().FlushRegion(data->addr, data->size); } else if (const auto data = std::get_if<InvalidateRegionCommand>(&next.data)) { @@ -78,9 +78,9 @@ void ThreadManager::SubmitList(Tegra::CommandList&& entries) { system.CoreTiming().ScheduleEvent(synchronization_ticks, synchronization_event, fence); } -void ThreadManager::SwapBuffers( - std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) { - PushCommand(SwapBuffersCommand(std::move(framebuffer))); +void ThreadManager::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { + PushCommand(SwapBuffersCommand(framebuffer ? *framebuffer + : std::optional<const Tegra::FramebufferConfig>{})); } void ThreadManager::FlushRegion(CacheAddr addr, u64 size) { |