summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-16 14:51:37 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-22 17:36:06 +0200
commitda8f17715dbdc7eec92f5f0c11c968a51b86cab4 (patch)
treea1604f3cf9abe9128d26834f9c68161ecab6e204 /src/video_core/renderer_vulkan
parentTexture Cache: Implement OnCPUWrite and SyncGuestHost (diff)
downloadyuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar
yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar.gz
yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar.bz2
yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar.lz
yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar.xz
yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.tar.zst
yuzu-da8f17715dbdc7eec92f5f0c11c968a51b86cab4.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp14
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index 71007bbe8..ad59f558d 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
@@ -524,6 +524,20 @@ void RasterizerVulkan::InvalidateRegion(VAddr addr, u64 size) {
query_cache.InvalidateRegion(addr, size);
}
+void RasterizerVulkan::OnCPUWrite(VAddr addr, u64 size) {
+ if (!addr || !size) {
+ return;
+ }
+ texture_cache.OnCPUWrite(addr, size);
+ pipeline_cache.InvalidateRegion(addr, size);
+ buffer_cache.InvalidateRegion(addr, size);
+}
+
+void RasterizerVulkan::SyncGuestHost() {
+ texture_cache.SyncGuestHost();
+ // buffer_cache.SyncGuestHost();
+}
+
void RasterizerVulkan::FlushAndInvalidateRegion(VAddr addr, u64 size) {
FlushRegion(addr, size);
InvalidateRegion(addr, size);
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.h b/src/video_core/renderer_vulkan/vk_rasterizer.h
index d9108f862..285f731bc 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.h
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.h
@@ -119,6 +119,8 @@ public:
void FlushAll() override;
void FlushRegion(VAddr addr, u64 size) override;
void InvalidateRegion(VAddr addr, u64 size) override;
+ void OnCPUWrite(VAddr addr, u64 size) override;
+ void SyncGuestHost() override;
void FlushAndInvalidateRegion(VAddr addr, u64 size) override;
void FlushCommands() override;
void TickFrame() override;