diff options
| author | 2020-04-22 22:09:38 -0400 | |
|---|---|---|
| committer | 2020-04-22 22:09:38 -0400 | |
| commit | bf2ddb8fd5feaeaf2806fe102de8e3089f893137 (patch) | |
| tree | b97d388da23608c00808b6662e3c0564fc4f6d59 /src/video_core/gpu_thread.h | |
| parent | Merge pull request #3767 from ReinUsesLisp/point-size-pipeline (diff) | |
| parent | GL_Fence_Manager: use GL_TIMEOUT_IGNORED instead of a loop, (diff) | |
| download | yuzu-bf2ddb8fd5feaeaf2806fe102de8e3089f893137.tar.gz yuzu-bf2ddb8fd5feaeaf2806fe102de8e3089f893137.tar.xz yuzu-bf2ddb8fd5feaeaf2806fe102de8e3089f893137.zip | |
Merge pull request #3677 from FernandoS27/better-sync
Introduce Predictive Flushing and Improve ASYNC GPU
Diffstat (limited to 'src/video_core/gpu_thread.h')
| -rw-r--r-- | src/video_core/gpu_thread.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/video_core/gpu_thread.h b/src/video_core/gpu_thread.h index cd74ad330..5a28335d6 100644 --- a/src/video_core/gpu_thread.h +++ b/src/video_core/gpu_thread.h | |||
| @@ -70,9 +70,16 @@ struct FlushAndInvalidateRegionCommand final { | |||
| 70 | u64 size; | 70 | u64 size; |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | /// Command called within the gpu, to schedule actions after a command list end | ||
| 74 | struct OnCommandListEndCommand final {}; | ||
| 75 | |||
| 76 | /// Command to make the gpu look into pending requests | ||
| 77 | struct GPUTickCommand final {}; | ||
| 78 | |||
| 73 | using CommandData = | 79 | using CommandData = |
| 74 | std::variant<EndProcessingCommand, SubmitListCommand, SwapBuffersCommand, FlushRegionCommand, | 80 | std::variant<EndProcessingCommand, SubmitListCommand, SwapBuffersCommand, FlushRegionCommand, |
| 75 | InvalidateRegionCommand, FlushAndInvalidateRegionCommand>; | 81 | InvalidateRegionCommand, FlushAndInvalidateRegionCommand, OnCommandListEndCommand, |
| 82 | GPUTickCommand>; | ||
| 76 | 83 | ||
| 77 | struct CommandDataContainer { | 84 | struct CommandDataContainer { |
| 78 | CommandDataContainer() = default; | 85 | CommandDataContainer() = default; |
| @@ -122,6 +129,8 @@ public: | |||
| 122 | // Wait until the gpu thread is idle. | 129 | // Wait until the gpu thread is idle. |
| 123 | void WaitIdle() const; | 130 | void WaitIdle() const; |
| 124 | 131 | ||
| 132 | void OnCommandListEnd(); | ||
| 133 | |||
| 125 | private: | 134 | private: |
| 126 | /// Pushes a command to be executed by the GPU thread | 135 | /// Pushes a command to be executed by the GPU thread |
| 127 | u64 PushCommand(CommandData&& command_data); | 136 | u64 PushCommand(CommandData&& command_data); |