summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu_asynch.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-08-25 04:56:11 +0200
committerGitHub <noreply@github.com>2020-08-25 04:56:11 +0200
commitbb752df73676fa09e5d37df53ce5a464dd747111 (patch)
tree1561d50ec2d80c2106aee208c101e19fa35c7614 /src/video_core/gpu_asynch.cpp
parentMerge pull request #4562 from lioncash/loop (diff)
parentvideo_core: Initialize renderer with a GPU (diff)
downloadyuzu-bb752df73676fa09e5d37df53ce5a464dd747111.tar
yuzu-bb752df73676fa09e5d37df53ce5a464dd747111.tar.gz
yuzu-bb752df73676fa09e5d37df53ce5a464dd747111.tar.bz2
yuzu-bb752df73676fa09e5d37df53ce5a464dd747111.tar.lz
yuzu-bb752df73676fa09e5d37df53ce5a464dd747111.tar.xz
yuzu-bb752df73676fa09e5d37df53ce5a464dd747111.tar.zst
yuzu-bb752df73676fa09e5d37df53ce5a464dd747111.zip
Diffstat (limited to 'src/video_core/gpu_asynch.cpp')
-rw-r--r--src/video_core/gpu_asynch.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/video_core/gpu_asynch.cpp b/src/video_core/gpu_asynch.cpp
index 7b855f63e..70a3d5738 100644
--- a/src/video_core/gpu_asynch.cpp
+++ b/src/video_core/gpu_asynch.cpp
@@ -10,16 +10,14 @@
namespace VideoCommon {
-GPUAsynch::GPUAsynch(Core::System& system, std::unique_ptr<VideoCore::RendererBase>&& renderer_,
- std::unique_ptr<Core::Frontend::GraphicsContext>&& context)
- : GPU(system, std::move(renderer_), true), gpu_thread{system},
- cpu_context(renderer->GetRenderWindow().CreateSharedContext()),
- gpu_context(std::move(context)) {}
+GPUAsynch::GPUAsynch(Core::System& system) : GPU{system, true}, gpu_thread{system} {}
GPUAsynch::~GPUAsynch() = default;
void GPUAsynch::Start() {
- gpu_thread.StartThread(*renderer, *gpu_context, *dma_pusher);
+ gpu_thread.StartThread(*renderer, renderer->Context(), *dma_pusher);
+ cpu_context = renderer->GetRenderWindow().CreateSharedContext();
+ cpu_context->MakeCurrent();
}
void GPUAsynch::ObtainContext() {