diff options
author | James Rowe <jroweboy@gmail.com> | 2020-03-25 03:58:49 +0100 |
---|---|---|
committer | James Rowe <jroweboy@gmail.com> | 2020-03-25 04:03:42 +0100 |
commit | 282adfc70b5d7d958d564bfda0227bb3fbd8d110 (patch) | |
tree | 2a98e3bedec2e7fdb33478814a73be664661aecc /src/video_core/gpu_asynch.cpp | |
parent | Use the correct directory for Qt Plugins (diff) | |
download | yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar.gz yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar.bz2 yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar.lz yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar.xz yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar.zst yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.zip |
Diffstat (limited to 'src/video_core/gpu_asynch.cpp')
-rw-r--r-- | src/video_core/gpu_asynch.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/video_core/gpu_asynch.cpp b/src/video_core/gpu_asynch.cpp index 04222d060..925be8d7b 100644 --- a/src/video_core/gpu_asynch.cpp +++ b/src/video_core/gpu_asynch.cpp @@ -10,13 +10,16 @@ namespace VideoCommon { -GPUAsynch::GPUAsynch(Core::System& system, VideoCore::RendererBase& renderer) - : GPU(system, renderer, true), gpu_thread{system} {} +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}, gpu_context(std::move(context)), + cpu_context(renderer->GetRenderWindow().CreateSharedContext()) {} GPUAsynch::~GPUAsynch() = default; void GPUAsynch::Start() { - gpu_thread.StartThread(renderer, *dma_pusher); + cpu_context->MakeCurrent(); + gpu_thread.StartThread(*renderer, *gpu_context, *dma_pusher); } void GPUAsynch::PushGPUEntries(Tegra::CommandList&& entries) { |