summaryrefslogtreecommitdiff
path: root/src/video_core/gpu_thread.h
diff options
context:
space:
mode:
authorGravatar bunnei2020-04-22 22:09:38 -0400
committerGravatar GitHub2020-04-22 22:09:38 -0400
commitbf2ddb8fd5feaeaf2806fe102de8e3089f893137 (patch)
treeb97d388da23608c00808b6662e3c0564fc4f6d59 /src/video_core/gpu_thread.h
parentMerge pull request #3767 from ReinUsesLisp/point-size-pipeline (diff)
parentGL_Fence_Manager: use GL_TIMEOUT_IGNORED instead of a loop, (diff)
downloadyuzu-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.h11
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
74struct OnCommandListEndCommand final {};
75
76/// Command to make the gpu look into pending requests
77struct GPUTickCommand final {};
78
73using CommandData = 79using 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
77struct CommandDataContainer { 84struct 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
125private: 134private:
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);