summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar bunnei2019-01-21 15:18:09 -0500
committerGravatar bunnei2019-03-06 21:09:09 -0500
commitac51d048a91593a3da124aeea32dc5b0898f1dd6 (patch)
tree91094e0615aea42b1541209fc00a3da6708f9bd1 /src/video_core
parentgpu: Refactor to take RendererBase instead of RasterizerInterface. (diff)
downloadyuzu-ac51d048a91593a3da124aeea32dc5b0898f1dd6.tar.gz
yuzu-ac51d048a91593a3da124aeea32dc5b0898f1dd6.tar.xz
yuzu-ac51d048a91593a3da124aeea32dc5b0898f1dd6.zip
gpu: Refactor command and swap buffers interface for asynch.
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/gpu.cpp10
-rw-r--r--src/video_core/gpu.h15
2 files changed, 22 insertions, 3 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index 08abf8ac9..b0f3310e5 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -65,6 +65,16 @@ const DmaPusher& GPU::DmaPusher() const {
65 return *dma_pusher; 65 return *dma_pusher;
66} 66}
67 67
68void GPU::PushGPUEntries(Tegra::CommandList&& entries) {
69 dma_pusher->Push(std::move(entries));
70 dma_pusher->DispatchCalls();
71}
72
73void GPU::SwapBuffers(
74 std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) {
75 renderer.SwapBuffers(std::move(framebuffer));
76}
77
68u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { 78u32 RenderTargetBytesPerPixel(RenderTargetFormat format) {
69 ASSERT(format != RenderTargetFormat::NONE); 79 ASSERT(format != RenderTargetFormat::NONE);
70 80
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index ac7aec6a4..62649bd6e 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -200,6 +200,13 @@ public:
200 std::array<u32, NUM_REGS> reg_array; 200 std::array<u32, NUM_REGS> reg_array;
201 }; 201 };
202 } regs{}; 202 } regs{};
203
204 /// Push GPU command entries to be processed
205 void PushGPUEntries(Tegra::CommandList&& entries);
206
207 /// Swap buffers (render frame)
208 void SwapBuffers(
209 std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer);
203 210
204private: 211private:
205 void ProcessBindMethod(const MethodCall& method_call); 212 void ProcessBindMethod(const MethodCall& method_call);
@@ -207,11 +214,13 @@ private:
207 void ProcessSemaphoreRelease(); 214 void ProcessSemaphoreRelease();
208 void ProcessSemaphoreAcquire(); 215 void ProcessSemaphoreAcquire();
209 216
210 // Calls a GPU puller method. 217 /// Calls a GPU puller method.
211 void CallPullerMethod(const MethodCall& method_call); 218 void CallPullerMethod(const MethodCall& method_call);
212 // Calls a GPU engine method. 219
220 /// Calls a GPU engine method.
213 void CallEngineMethod(const MethodCall& method_call); 221 void CallEngineMethod(const MethodCall& method_call);
214 // Determines where the method should be executed. 222
223 /// Determines where the method should be executed.
215 bool ExecuteMethodOnEngine(const MethodCall& method_call); 224 bool ExecuteMethodOnEngine(const MethodCall& method_call);
216 225
217private: 226private: