summaryrefslogtreecommitdiff
path: root/src/video_core/gpu_thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/gpu_thread.h')
-rw-r--r--src/video_core/gpu_thread.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/video_core/gpu_thread.h b/src/video_core/gpu_thread.h
index 5a28335d6..32a34e3a7 100644
--- a/src/video_core/gpu_thread.h
+++ b/src/video_core/gpu_thread.h
@@ -37,6 +37,14 @@ struct SubmitListCommand final {
37 Tegra::CommandList entries; 37 Tegra::CommandList entries;
38}; 38};
39 39
40/// Command to signal to the GPU thread that a cdma command list is ready for processing
41struct SubmitChCommandEntries final {
42 explicit SubmitChCommandEntries(Tegra::ChCommandHeaderList&& entries)
43 : entries{std::move(entries)} {}
44
45 Tegra::ChCommandHeaderList entries;
46};
47
40/// Command to signal to the GPU thread that a swap buffers is pending 48/// Command to signal to the GPU thread that a swap buffers is pending
41struct SwapBuffersCommand final { 49struct SwapBuffersCommand final {
42 explicit SwapBuffersCommand(std::optional<const Tegra::FramebufferConfig> framebuffer) 50 explicit SwapBuffersCommand(std::optional<const Tegra::FramebufferConfig> framebuffer)
@@ -77,9 +85,9 @@ struct OnCommandListEndCommand final {};
77struct GPUTickCommand final {}; 85struct GPUTickCommand final {};
78 86
79using CommandData = 87using CommandData =
80 std::variant<EndProcessingCommand, SubmitListCommand, SwapBuffersCommand, FlushRegionCommand, 88 std::variant<EndProcessingCommand, SubmitListCommand, SubmitChCommandEntries,
81 InvalidateRegionCommand, FlushAndInvalidateRegionCommand, OnCommandListEndCommand, 89 SwapBuffersCommand, FlushRegionCommand, InvalidateRegionCommand,
82 GPUTickCommand>; 90 FlushAndInvalidateRegionCommand, OnCommandListEndCommand, GPUTickCommand>;
83 91
84struct CommandDataContainer { 92struct CommandDataContainer {
85 CommandDataContainer() = default; 93 CommandDataContainer() = default;
@@ -109,11 +117,14 @@ public:
109 117
110 /// Creates and starts the GPU thread. 118 /// Creates and starts the GPU thread.
111 void StartThread(VideoCore::RendererBase& renderer, Core::Frontend::GraphicsContext& context, 119 void StartThread(VideoCore::RendererBase& renderer, Core::Frontend::GraphicsContext& context,
112 Tegra::DmaPusher& dma_pusher); 120 Tegra::DmaPusher& dma_pusher, Tegra::CDmaPusher& cdma_pusher);
113 121
114 /// Push GPU command entries to be processed 122 /// Push GPU command entries to be processed
115 void SubmitList(Tegra::CommandList&& entries); 123 void SubmitList(Tegra::CommandList&& entries);
116 124
125 /// Push GPU CDMA command buffer entries to be processed
126 void SubmitCommandBuffer(Tegra::ChCommandHeaderList&& entries);
127
117 /// Swap buffers (render frame) 128 /// Swap buffers (render frame)
118 void SwapBuffers(const Tegra::FramebufferConfig* framebuffer); 129 void SwapBuffers(const Tegra::FramebufferConfig* framebuffer);
119 130