diff options
| author | 2020-04-03 11:58:43 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:36:08 -0400 | |
| commit | ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c (patch) | |
| tree | f24dd8b60b23abe73931a934af33d2ed82aa7975 /src/video_core/gpu_asynch.cpp | |
| parent | CoreTiming/CycleTimer: Correct Idling. (diff) | |
| download | yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.tar.gz yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.tar.xz yuzu-ad92865497f83fe4c19cd9ab78cce9da1a8c3a6c.zip | |
General: Correct rebase, sync gpu and context management.
Diffstat (limited to 'src/video_core/gpu_asynch.cpp')
| -rw-r--r-- | src/video_core/gpu_asynch.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/video_core/gpu_asynch.cpp b/src/video_core/gpu_asynch.cpp index 53305ab43..7b855f63e 100644 --- a/src/video_core/gpu_asynch.cpp +++ b/src/video_core/gpu_asynch.cpp | |||
| @@ -19,10 +19,17 @@ GPUAsynch::GPUAsynch(Core::System& system, std::unique_ptr<VideoCore::RendererBa | |||
| 19 | GPUAsynch::~GPUAsynch() = default; | 19 | GPUAsynch::~GPUAsynch() = default; |
| 20 | 20 | ||
| 21 | void GPUAsynch::Start() { | 21 | void GPUAsynch::Start() { |
| 22 | cpu_context->MakeCurrent(); | ||
| 23 | gpu_thread.StartThread(*renderer, *gpu_context, *dma_pusher); | 22 | gpu_thread.StartThread(*renderer, *gpu_context, *dma_pusher); |
| 24 | } | 23 | } |
| 25 | 24 | ||
| 25 | void GPUAsynch::ObtainContext() { | ||
| 26 | cpu_context->MakeCurrent(); | ||
| 27 | } | ||
| 28 | |||
| 29 | void GPUAsynch::ReleaseContext() { | ||
| 30 | cpu_context->DoneCurrent(); | ||
| 31 | } | ||
| 32 | |||
| 26 | void GPUAsynch::PushGPUEntries(Tegra::CommandList&& entries) { | 33 | void GPUAsynch::PushGPUEntries(Tegra::CommandList&& entries) { |
| 27 | gpu_thread.SubmitList(std::move(entries)); | 34 | gpu_thread.SubmitList(std::move(entries)); |
| 28 | } | 35 | } |