diff options
Diffstat (limited to 'src/video_core/gpu.cpp')
| -rw-r--r-- | src/video_core/gpu.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index a1d19b1c8..d7a3dd96b 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -93,16 +93,13 @@ struct GPU::Impl { | |||
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | /// Synchronizes CPU writes with Host GPU memory. | 95 | /// Synchronizes CPU writes with Host GPU memory. |
| 96 | void SyncGuestHost() { | 96 | void InvalidateGPUCache() { |
| 97 | rasterizer->SyncGuestHost(); | 97 | rasterizer->InvalidateGPUCache(); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | /// Signal the ending of command list. | 100 | /// Signal the ending of command list. |
| 101 | void OnCommandListEnd() { | 101 | void OnCommandListEnd() { |
| 102 | if (is_async) { | 102 | gpu_thread.OnCommandListEnd(); |
| 103 | // This command only applies to asynchronous GPU mode | ||
| 104 | gpu_thread.OnCommandListEnd(); | ||
| 105 | } | ||
| 106 | } | 103 | } |
| 107 | 104 | ||
| 108 | /// Request a host GPU memory flush from the CPU. | 105 | /// Request a host GPU memory flush from the CPU. |
| @@ -296,7 +293,7 @@ struct GPU::Impl { | |||
| 296 | } | 293 | } |
| 297 | 294 | ||
| 298 | void RequestSwapBuffers(const Tegra::FramebufferConfig* framebuffer, | 295 | void RequestSwapBuffers(const Tegra::FramebufferConfig* framebuffer, |
| 299 | Service::Nvidia::NvFence* fences, size_t num_fences) { | 296 | std::array<Service::Nvidia::NvFence, 4>& fences, size_t num_fences) { |
| 300 | size_t current_request_counter{}; | 297 | size_t current_request_counter{}; |
| 301 | { | 298 | { |
| 302 | std::unique_lock<std::mutex> lk(request_swap_mutex); | 299 | std::unique_lock<std::mutex> lk(request_swap_mutex); |
| @@ -412,8 +409,8 @@ void GPU::FlushCommands() { | |||
| 412 | impl->FlushCommands(); | 409 | impl->FlushCommands(); |
| 413 | } | 410 | } |
| 414 | 411 | ||
| 415 | void GPU::SyncGuestHost() { | 412 | void GPU::InvalidateGPUCache() { |
| 416 | impl->SyncGuestHost(); | 413 | impl->InvalidateGPUCache(); |
| 417 | } | 414 | } |
| 418 | 415 | ||
| 419 | void GPU::OnCommandListEnd() { | 416 | void GPU::OnCommandListEnd() { |
| @@ -488,7 +485,7 @@ const VideoCore::ShaderNotify& GPU::ShaderNotify() const { | |||
| 488 | } | 485 | } |
| 489 | 486 | ||
| 490 | void GPU::RequestSwapBuffers(const Tegra::FramebufferConfig* framebuffer, | 487 | void GPU::RequestSwapBuffers(const Tegra::FramebufferConfig* framebuffer, |
| 491 | Service::Nvidia::NvFence* fences, size_t num_fences) { | 488 | std::array<Service::Nvidia::NvFence, 4>& fences, size_t num_fences) { |
| 492 | impl->RequestSwapBuffers(framebuffer, fences, num_fences); | 489 | impl->RequestSwapBuffers(framebuffer, fences, num_fences); |
| 493 | } | 490 | } |
| 494 | 491 | ||