diff options
| author | 2020-08-24 22:56:11 -0400 | |
|---|---|---|
| committer | 2020-08-24 22:56:11 -0400 | |
| commit | bb752df73676fa09e5d37df53ce5a464dd747111 (patch) | |
| tree | 1561d50ec2d80c2106aee208c101e19fa35c7614 /src/video_core/gpu_asynch.cpp | |
| parent | Merge pull request #4562 from lioncash/loop (diff) | |
| parent | video_core: Initialize renderer with a GPU (diff) | |
| download | yuzu-bb752df73676fa09e5d37df53ce5a464dd747111.tar.gz yuzu-bb752df73676fa09e5d37df53ce5a464dd747111.tar.xz yuzu-bb752df73676fa09e5d37df53ce5a464dd747111.zip | |
Merge pull request #4542 from ReinUsesLisp/gpu-init-base
video_core: Initialize renderer with a GPU
Diffstat (limited to 'src/video_core/gpu_asynch.cpp')
| -rw-r--r-- | src/video_core/gpu_asynch.cpp | 10 |
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 @@ | |||
| 10 | 10 | ||
| 11 | namespace VideoCommon { | 11 | namespace VideoCommon { |
| 12 | 12 | ||
| 13 | GPUAsynch::GPUAsynch(Core::System& system, std::unique_ptr<VideoCore::RendererBase>&& renderer_, | 13 | GPUAsynch::GPUAsynch(Core::System& system) : GPU{system, true}, gpu_thread{system} {} |
| 14 | std::unique_ptr<Core::Frontend::GraphicsContext>&& context) | ||
| 15 | : GPU(system, std::move(renderer_), true), gpu_thread{system}, | ||
| 16 | cpu_context(renderer->GetRenderWindow().CreateSharedContext()), | ||
| 17 | gpu_context(std::move(context)) {} | ||
| 18 | 14 | ||
| 19 | GPUAsynch::~GPUAsynch() = default; | 15 | GPUAsynch::~GPUAsynch() = default; |
| 20 | 16 | ||
| 21 | void GPUAsynch::Start() { | 17 | void GPUAsynch::Start() { |
| 22 | gpu_thread.StartThread(*renderer, *gpu_context, *dma_pusher); | 18 | gpu_thread.StartThread(*renderer, renderer->Context(), *dma_pusher); |
| 19 | cpu_context = renderer->GetRenderWindow().CreateSharedContext(); | ||
| 20 | cpu_context->MakeCurrent(); | ||
| 23 | } | 21 | } |
| 24 | 22 | ||
| 25 | void GPUAsynch::ObtainContext() { | 23 | void GPUAsynch::ObtainContext() { |