From de8ff8a1c629b97be98267e9866ce10b63ad12ad Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow <fsahmkow27@gmail.com> Date: Sat, 20 Jul 2019 12:18:54 -0400 Subject: [PATCH] Buffer_Cache: Implement barriers. --- src/video_core/buffer_cache/buffer_cache.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 4ea43a6c4..03b288233 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -60,6 +60,10 @@ public: map->MarkAsWritten(true); MarkRegionAsWritten(map->GetStart(), map->GetEnd() - 1); } + } else { + if (map->IsWritten()) { + WriteBarrier(); + } } const u64 offset = static_cast<u64>(block->GetOffset(cache_addr));