diff options
| author | 2020-02-17 18:10:23 -0400 | |
|---|---|---|
| committer | 2020-04-22 11:36:10 -0400 | |
| commit | 487379c593bcaf3787ede187c5d44f7923b54dc9 (patch) | |
| tree | b66c5c541a55be6d4b76b78c07be11731a7cb400 /src/video_core/gpu_thread.cpp | |
| parent | TextureCache: Flush linear textures after finishing rendering. (diff) | |
| download | yuzu-487379c593bcaf3787ede187c5d44f7923b54dc9.tar.gz yuzu-487379c593bcaf3787ede187c5d44f7923b54dc9.tar.xz yuzu-487379c593bcaf3787ede187c5d44f7923b54dc9.zip | |
OpenGL: Implement Fencing backend.
Diffstat (limited to 'src/video_core/gpu_thread.cpp')
| -rw-r--r-- | src/video_core/gpu_thread.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index 1994d3bb4..251a9d911 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp | |||
| @@ -37,6 +37,8 @@ static void RunThread(VideoCore::RendererBase& renderer, Core::Frontend::Graphic | |||
| 37 | dma_pusher.DispatchCalls(); | 37 | dma_pusher.DispatchCalls(); |
| 38 | } else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) { | 38 | } else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) { |
| 39 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); | 39 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); |
| 40 | } else if (const auto data = std::get_if<OnCommandListEndCommand>(&next.data)) { | ||
| 41 | renderer.Rasterizer().ReleaseFences(); | ||
| 40 | } else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) { | 42 | } else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) { |
| 41 | renderer.Rasterizer().FlushRegion(data->addr, data->size); | 43 | renderer.Rasterizer().FlushRegion(data->addr, data->size); |
| 42 | } else if (const auto data = std::get_if<InvalidateRegionCommand>(&next.data)) { | 44 | } else if (const auto data = std::get_if<InvalidateRegionCommand>(&next.data)) { |
| @@ -95,6 +97,10 @@ void ThreadManager::WaitIdle() const { | |||
| 95 | } | 97 | } |
| 96 | } | 98 | } |
| 97 | 99 | ||
| 100 | void ThreadManager::OnCommandListEnd() { | ||
| 101 | PushCommand(OnCommandListEndCommand()); | ||
| 102 | } | ||
| 103 | |||
| 98 | u64 ThreadManager::PushCommand(CommandData&& command_data) { | 104 | u64 ThreadManager::PushCommand(CommandData&& command_data) { |
| 99 | const u64 fence{++state.last_fence}; | 105 | const u64 fence{++state.last_fence}; |
| 100 | state.queue.Push(CommandDataContainer(std::move(command_data), fence)); | 106 | state.queue.Push(CommandDataContainer(std::move(command_data), fence)); |