diff options
| author | 2020-06-11 00:58:57 -0300 | |
|---|---|---|
| committer | 2020-08-22 01:51:45 -0300 | |
| commit | da53bcee60fced902479b72b40ed26b099fa9938 (patch) | |
| tree | b83232ad60b7725090b31bd3e347c9df774ced40 /src/video_core/gpu_synch.cpp | |
| parent | Merge pull request #4536 from lioncash/semi3 (diff) | |
| download | yuzu-da53bcee60fced902479b72b40ed26b099fa9938.tar.gz yuzu-da53bcee60fced902479b72b40ed26b099fa9938.tar.xz yuzu-da53bcee60fced902479b72b40ed26b099fa9938.zip | |
video_core: Initialize renderer with a GPU
Add an extra step in GPU initialization to be able to initialize render
backends with a valid GPU instance.
Diffstat (limited to 'src/video_core/gpu_synch.cpp')
| -rw-r--r-- | src/video_core/gpu_synch.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/gpu_synch.cpp b/src/video_core/gpu_synch.cpp index aaeb9811d..1ca47ddef 100644 --- a/src/video_core/gpu_synch.cpp +++ b/src/video_core/gpu_synch.cpp | |||
| @@ -7,20 +7,18 @@ | |||
| 7 | 7 | ||
| 8 | namespace VideoCommon { | 8 | namespace VideoCommon { |
| 9 | 9 | ||
| 10 | GPUSynch::GPUSynch(Core::System& system, std::unique_ptr<VideoCore::RendererBase>&& renderer, | 10 | GPUSynch::GPUSynch(Core::System& system) : GPU{system, false} {} |
| 11 | std::unique_ptr<Core::Frontend::GraphicsContext>&& context) | ||
| 12 | : GPU(system, std::move(renderer), false), context{std::move(context)} {} | ||
| 13 | 11 | ||
| 14 | GPUSynch::~GPUSynch() = default; | 12 | GPUSynch::~GPUSynch() = default; |
| 15 | 13 | ||
| 16 | void GPUSynch::Start() {} | 14 | void GPUSynch::Start() {} |
| 17 | 15 | ||
| 18 | void GPUSynch::ObtainContext() { | 16 | void GPUSynch::ObtainContext() { |
| 19 | context->MakeCurrent(); | 17 | renderer->Context().MakeCurrent(); |
| 20 | } | 18 | } |
| 21 | 19 | ||
| 22 | void GPUSynch::ReleaseContext() { | 20 | void GPUSynch::ReleaseContext() { |
| 23 | context->DoneCurrent(); | 21 | renderer->Context().DoneCurrent(); |
| 24 | } | 22 | } |
| 25 | 23 | ||
| 26 | void GPUSynch::PushGPUEntries(Tegra::CommandList&& entries) { | 24 | void GPUSynch::PushGPUEntries(Tegra::CommandList&& entries) { |