diff options
| author | 2023-02-07 17:21:17 -0700 | |
|---|---|---|
| committer | 2023-02-07 17:21:17 -0700 | |
| commit | 8551ac60080451f2defd3fead38abf331a48f964 (patch) | |
| tree | b9cc5d32be6861f48b4173a0a31dbe8823e79c08 /src | |
| parent | Merge pull request #4949 from Morph1984/hidpi-temp-fix (diff) | |
| download | yuzu-8551ac60080451f2defd3fead38abf331a48f964.tar.gz yuzu-8551ac60080451f2defd3fead38abf331a48f964.tar.xz yuzu-8551ac60080451f2defd3fead38abf331a48f964.zip | |
Remove OnCommandListEndCommand
Call rasterizer->ReleaseFences() directly
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/gpu.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/gpu_thread.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/gpu_thread.h | 8 |
3 files changed, 2 insertions, 14 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index c6d54be63..7024a19cf 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -99,7 +99,7 @@ struct GPU::Impl { | |||
| 99 | 99 | ||
| 100 | /// Signal the ending of command list. | 100 | /// Signal the ending of command list. |
| 101 | void OnCommandListEnd() { | 101 | void OnCommandListEnd() { |
| 102 | gpu_thread.OnCommandListEnd(); | 102 | rasterizer->ReleaseFences(); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | /// Request a host GPU memory flush from the CPU. | 105 | /// Request a host GPU memory flush from the CPU. |
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index 164a5252a..9c103c0d4 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp | |||
| @@ -40,8 +40,6 @@ static void RunThread(std::stop_token stop_token, Core::System& system, | |||
| 40 | scheduler.Push(submit_list->channel, std::move(submit_list->entries)); | 40 | scheduler.Push(submit_list->channel, std::move(submit_list->entries)); |
| 41 | } else if (const auto* data = std::get_if<SwapBuffersCommand>(&next.data)) { | 41 | } else if (const auto* data = std::get_if<SwapBuffersCommand>(&next.data)) { |
| 42 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); | 42 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); |
| 43 | } else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) { | ||
| 44 | rasterizer->ReleaseFences(); | ||
| 45 | } else if (std::holds_alternative<GPUTickCommand>(next.data)) { | 43 | } else if (std::holds_alternative<GPUTickCommand>(next.data)) { |
| 46 | system.GPU().TickWork(); | 44 | system.GPU().TickWork(); |
| 47 | } else if (const auto* flush = std::get_if<FlushRegionCommand>(&next.data)) { | 45 | } else if (const auto* flush = std::get_if<FlushRegionCommand>(&next.data)) { |
| @@ -110,10 +108,6 @@ void ThreadManager::FlushAndInvalidateRegion(VAddr addr, u64 size) { | |||
| 110 | rasterizer->OnCPUWrite(addr, size); | 108 | rasterizer->OnCPUWrite(addr, size); |
| 111 | } | 109 | } |
| 112 | 110 | ||
| 113 | void ThreadManager::OnCommandListEnd() { | ||
| 114 | PushCommand(OnCommandListEndCommand()); | ||
| 115 | } | ||
| 116 | |||
| 117 | u64 ThreadManager::PushCommand(CommandData&& command_data, bool block) { | 111 | u64 ThreadManager::PushCommand(CommandData&& command_data, bool block) { |
| 118 | if (!is_async) { | 112 | if (!is_async) { |
| 119 | // In synchronous GPU mode, block the caller until the command has executed | 113 | // In synchronous GPU mode, block the caller until the command has executed |
diff --git a/src/video_core/gpu_thread.h b/src/video_core/gpu_thread.h index c71a419c7..90bcb5958 100644 --- a/src/video_core/gpu_thread.h +++ b/src/video_core/gpu_thread.h | |||
| @@ -77,16 +77,12 @@ struct FlushAndInvalidateRegionCommand final { | |||
| 77 | u64 size; | 77 | u64 size; |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | /// Command called within the gpu, to schedule actions after a command list end | ||
| 81 | struct OnCommandListEndCommand final {}; | ||
| 82 | |||
| 83 | /// Command to make the gpu look into pending requests | 80 | /// Command to make the gpu look into pending requests |
| 84 | struct GPUTickCommand final {}; | 81 | struct GPUTickCommand final {}; |
| 85 | 82 | ||
| 86 | using CommandData = | 83 | using CommandData = |
| 87 | std::variant<std::monostate, SubmitListCommand, SwapBuffersCommand, FlushRegionCommand, | 84 | std::variant<std::monostate, SubmitListCommand, SwapBuffersCommand, FlushRegionCommand, |
| 88 | InvalidateRegionCommand, FlushAndInvalidateRegionCommand, OnCommandListEndCommand, | 85 | InvalidateRegionCommand, FlushAndInvalidateRegionCommand, GPUTickCommand>; |
| 89 | GPUTickCommand>; | ||
| 90 | 86 | ||
| 91 | struct CommandDataContainer { | 87 | struct CommandDataContainer { |
| 92 | CommandDataContainer() = default; | 88 | CommandDataContainer() = default; |
| @@ -134,8 +130,6 @@ public: | |||
| 134 | /// Notify rasterizer that any caches of the specified region should be flushed and invalidated | 130 | /// Notify rasterizer that any caches of the specified region should be flushed and invalidated |
| 135 | void FlushAndInvalidateRegion(VAddr addr, u64 size); | 131 | void FlushAndInvalidateRegion(VAddr addr, u64 size); |
| 136 | 132 | ||
| 137 | void OnCommandListEnd(); | ||
| 138 | |||
| 139 | void TickGPU(); | 133 | void TickGPU(); |
| 140 | 134 | ||
| 141 | private: | 135 | private: |