summaryrefslogtreecommitdiff
path: root/src/video_core/rasterizer_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
-rw-r--r--src/video_core/rasterizer_interface.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h
index b6907463c..f44c7df50 100644
--- a/src/video_core/rasterizer_interface.h
+++ b/src/video_core/rasterizer_interface.h
@@ -8,6 +8,7 @@
8#include <span> 8#include <span>
9#include "common/common_types.h" 9#include "common/common_types.h"
10#include "common/polyfill_thread.h" 10#include "common/polyfill_thread.h"
11#include "video_core/cache_types.h"
11#include "video_core/engines/fermi_2d.h" 12#include "video_core/engines/fermi_2d.h"
12#include "video_core/gpu.h" 13#include "video_core/gpu.h"
13 14
@@ -42,6 +43,9 @@ public:
42 /// Dispatches a draw invocation 43 /// Dispatches a draw invocation
43 virtual void Draw(bool is_indexed, u32 instance_count) = 0; 44 virtual void Draw(bool is_indexed, u32 instance_count) = 0;
44 45
46 /// Dispatches an indirect draw invocation
47 virtual void DrawIndirect() {}
48
45 /// Clear the current framebuffer 49 /// Clear the current framebuffer
46 virtual void Clear(u32 layer_count) = 0; 50 virtual void Clear(u32 layer_count) = 0;
47 51
@@ -80,13 +84,16 @@ public:
80 virtual void FlushAll() = 0; 84 virtual void FlushAll() = 0;
81 85
82 /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory 86 /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory
83 virtual void FlushRegion(VAddr addr, u64 size) = 0; 87 virtual void FlushRegion(VAddr addr, u64 size,
88 VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0;
84 89
85 /// Check if the the specified memory area requires flushing to CPU Memory. 90 /// Check if the the specified memory area requires flushing to CPU Memory.
86 virtual bool MustFlushRegion(VAddr addr, u64 size) = 0; 91 virtual bool MustFlushRegion(VAddr addr, u64 size,
92 VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0;
87 93
88 /// Notify rasterizer that any caches of the specified region should be invalidated 94 /// Notify rasterizer that any caches of the specified region should be invalidated
89 virtual void InvalidateRegion(VAddr addr, u64 size) = 0; 95 virtual void InvalidateRegion(VAddr addr, u64 size,
96 VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0;
90 97
91 /// Notify rasterizer that any caches of the specified region are desync with guest 98 /// Notify rasterizer that any caches of the specified region are desync with guest
92 virtual void OnCPUWrite(VAddr addr, u64 size) = 0; 99 virtual void OnCPUWrite(VAddr addr, u64 size) = 0;
@@ -102,7 +109,8 @@ public:
102 109
103 /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory 110 /// Notify rasterizer that any caches of the specified region should be flushed to Switch memory
104 /// and invalidated 111 /// and invalidated
105 virtual void FlushAndInvalidateRegion(VAddr addr, u64 size) = 0; 112 virtual void FlushAndInvalidateRegion(
113 VAddr addr, u64 size, VideoCommon::CacheType which = VideoCommon::CacheType::All) = 0;
106 114
107 /// Notify the host renderer to wait for previous primitive and compute operations. 115 /// Notify the host renderer to wait for previous primitive and compute operations.
108 virtual void WaitForIdle() = 0; 116 virtual void WaitForIdle() = 0;
@@ -119,6 +127,10 @@ public:
119 /// Notify rasterizer that a frame is about to finish 127 /// Notify rasterizer that a frame is about to finish
120 virtual void TickFrame() = 0; 128 virtual void TickFrame() = 0;
121 129
130 virtual bool AccelerateConditionalRendering() {
131 return false;
132 }
133
122 /// Attempt to use a faster method to perform a surface copy 134 /// Attempt to use a faster method to perform a surface copy
123 [[nodiscard]] virtual bool AccelerateSurfaceCopy( 135 [[nodiscard]] virtual bool AccelerateSurfaceCopy(
124 const Tegra::Engines::Fermi2D::Surface& src, const Tegra::Engines::Fermi2D::Surface& dst, 136 const Tegra::Engines::Fermi2D::Surface& src, const Tegra::Engines::Fermi2D::Surface& dst,