summaryrefslogtreecommitdiff
path: root/src/video_core/rasterizer_interface.h
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-04-28 02:14:11 -0300
committerGravatar ReinUsesLisp2020-04-28 02:18:12 -0300
commitfe931ac9761a813c8e7d195cf99bf68ff324839c (patch)
tree7a1b2a9c2a85ee0e93a19953f03b50530d085c5f /src/video_core/rasterizer_interface.h
parentMerge pull request #3766 from ReinUsesLisp/renderpass-cache-key (diff)
downloadyuzu-fe931ac9761a813c8e7d195cf99bf68ff324839c.tar.gz
yuzu-fe931ac9761a813c8e7d195cf99bf68ff324839c.tar.xz
yuzu-fe931ac9761a813c8e7d195cf99bf68ff324839c.zip
{maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
Drop MemoryBarrier from the buffer cache and use Maxwell3D's register WaitForIdle. To implement this on OpenGL we just call glMemoryBarrier with the necessary bits. Vulkan lacks this synchronization primitive, so we set an event and immediately wait for it. This is not a pretty solution, but it's what Vulkan can do without submitting the current command buffer to the queue (which ends up being more expensive on the CPU).
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
-rw-r--r--src/video_core/rasterizer_interface.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h
index 603f61952..3cbdac8e7 100644
--- a/src/video_core/rasterizer_interface.h
+++ b/src/video_core/rasterizer_interface.h
@@ -80,6 +80,9 @@ public:
80 /// and invalidated 80 /// and invalidated
81 virtual void FlushAndInvalidateRegion(VAddr addr, u64 size) = 0; 81 virtual void FlushAndInvalidateRegion(VAddr addr, u64 size) = 0;
82 82
83 /// Notify the host renderer to wait for previous primitive and compute operations.
84 virtual void WaitForIdle() = 0;
85
83 /// Notify the rasterizer to send all written commands to the host GPU. 86 /// Notify the rasterizer to send all written commands to the host GPU.
84 virtual void FlushCommands() = 0; 87 virtual void FlushCommands() = 0;
85 88