aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache/buffer_cache.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-04-28 02:14:11 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-04-28 02:18:12 -0300
commit8835d400240f02353fbdfc93851ac0b0b7d7d629 (patch)
tree7a1b2a9c2a85ee0e93a19953f03b50530d085c5f /src/video_core/buffer_cache/buffer_cache.h
parentfe8ea9e0c967b80f04e3b1702e078a7b4878921d (diff)
{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/buffer_cache/buffer_cache.h')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 510f11089f..c86e914bed 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -89,10 +89,6 @@ public:
map->MarkAsWritten(true);
MarkRegionAsWritten(map->GetStart(), map->GetEnd() - 1);
}
- } else {
- if (map->IsWritten()) {
- WriteBarrier();
- }
}
return {ToHandle(block), static_cast<u64>(block->GetOffset(cpu_addr))};
@@ -254,8 +250,6 @@ protected:
virtual BufferType ToHandle(const OwnerBuffer& storage) = 0;
- virtual void WriteBarrier() = 0;
-
virtual OwnerBuffer CreateBlock(VAddr cpu_addr, std::size_t size) = 0;
virtual void UploadBlockData(const OwnerBuffer& buffer, std::size_t offset, std::size_t size,