summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r--src/video_core/gpu.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 62649bd6e..3f3098bf1 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -19,6 +19,10 @@ namespace VideoCore {
19class RendererBase; 19class RendererBase;
20} // namespace VideoCore 20} // namespace VideoCore
21 21
22namespace VideoCommon::GPUThread {
23class ThreadManager;
24} // namespace VideoCommon::GPUThread
25
22namespace Tegra { 26namespace Tegra {
23 27
24enum class RenderTargetFormat : u32 { 28enum class RenderTargetFormat : u32 {
@@ -200,7 +204,7 @@ public:
200 std::array<u32, NUM_REGS> reg_array; 204 std::array<u32, NUM_REGS> reg_array;
201 }; 205 };
202 } regs{}; 206 } regs{};
203 207
204 /// Push GPU command entries to be processed 208 /// Push GPU command entries to be processed
205 void PushGPUEntries(Tegra::CommandList&& entries); 209 void PushGPUEntries(Tegra::CommandList&& entries);
206 210
@@ -208,6 +212,15 @@ public:
208 void SwapBuffers( 212 void SwapBuffers(
209 std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer); 213 std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer);
210 214
215 /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory
216 void FlushRegion(VAddr addr, u64 size);
217
218 /// Notify rasterizer that any caches of the specified region should be invalidated
219 void InvalidateRegion(VAddr addr, u64 size);
220
221 /// Notify rasterizer that any caches of the specified region should be flushed and invalidated
222 void FlushAndInvalidateRegion(VAddr addr, u64 size);
223
211private: 224private:
212 void ProcessBindMethod(const MethodCall& method_call); 225 void ProcessBindMethod(const MethodCall& method_call);
213 void ProcessSemaphoreTriggerMethod(); 226 void ProcessSemaphoreTriggerMethod();
@@ -216,17 +229,18 @@ private:
216 229
217 /// Calls a GPU puller method. 230 /// Calls a GPU puller method.
218 void CallPullerMethod(const MethodCall& method_call); 231 void CallPullerMethod(const MethodCall& method_call);
219 232
220 /// Calls a GPU engine method. 233 /// Calls a GPU engine method.
221 void CallEngineMethod(const MethodCall& method_call); 234 void CallEngineMethod(const MethodCall& method_call);
222 235
223 /// Determines where the method should be executed. 236 /// Determines where the method should be executed.
224 bool ExecuteMethodOnEngine(const MethodCall& method_call); 237 bool ExecuteMethodOnEngine(const MethodCall& method_call);
225 238
226private: 239private:
227 std::unique_ptr<Tegra::DmaPusher> dma_pusher; 240 std::unique_ptr<Tegra::DmaPusher> dma_pusher;
228 std::unique_ptr<Tegra::MemoryManager> memory_manager; 241 std::unique_ptr<Tegra::MemoryManager> memory_manager;
229 242 std::unique_ptr<VideoCommon::GPUThread::ThreadManager> gpu_thread;
243
230 VideoCore::RendererBase& renderer; 244 VideoCore::RendererBase& renderer;
231 245
232 /// Mapping of command subchannels to their bound engine ids. 246 /// Mapping of command subchannels to their bound engine ids.