summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-18 18:24:38 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-22 17:36:14 +0200
commit4adfc9bb0870296b372dc96296436538d6aa6c32 (patch)
treedf7dac8d36ec4a4a9c89ed6512eeb4372af4289c /src/video_core/renderer_vulkan
parentGPU: Fix rebase errors. (diff)
downloadyuzu-4adfc9bb0870296b372dc96296436538d6aa6c32.tar
yuzu-4adfc9bb0870296b372dc96296436538d6aa6c32.tar.gz
yuzu-4adfc9bb0870296b372dc96296436538d6aa6c32.tar.bz2
yuzu-4adfc9bb0870296b372dc96296436538d6aa6c32.tar.lz
yuzu-4adfc9bb0870296b372dc96296436538d6aa6c32.tar.xz
yuzu-4adfc9bb0870296b372dc96296436538d6aa6c32.tar.zst
yuzu-4adfc9bb0870296b372dc96296436538d6aa6c32.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp25
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.h2
2 files changed, 27 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
index 9437a4aa1..1d75a4766 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp
@@ -535,6 +535,7 @@ void RasterizerVulkan::OnCPUWrite(VAddr addr, u64 size) {
texture_cache.OnCPUWrite(addr, size);
pipeline_cache.InvalidateRegion(addr, size);
buffer_cache.OnCPUWrite(addr, size);
+ query_cache.InvalidateRegion(addr, size);
}
void RasterizerVulkan::SyncGuestHost() {
@@ -542,6 +543,30 @@ void RasterizerVulkan::SyncGuestHost() {
buffer_cache.SyncGuestHost();
}
+void RasterizerVulkan::SignalFence(GPUVAddr addr, u32 value) {
+ auto& gpu{system.GPU()};
+ auto& memory_manager{gpu.MemoryManager()};
+ memory_manager.Write<u32>(addr, value);
+ /*
+ if (!gpu.IsAsync()) {
+ auto& memory_manager{gpu.MemoryManager()};
+ memory_manager.Write<u32>(addr, value);
+ return;
+ }
+ fence_manager.SignalFence(addr, value);
+ */
+}
+
+void RasterizerVulkan::ReleaseFences() {
+ /*
+ auto& gpu{system.GPU()};
+ if (!gpu.IsAsync()) {
+ return;
+ }
+ fence_manager.WaitPendingFences();
+ */
+}
+
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 7002a4fa3..08a9af401 100644
--- a/src/video_core/renderer_vulkan/vk_rasterizer.h
+++ b/src/video_core/renderer_vulkan/vk_rasterizer.h
@@ -122,6 +122,8 @@ public:
void InvalidateRegion(VAddr addr, u64 size) override;
void OnCPUWrite(VAddr addr, u64 size) override;
void SyncGuestHost() override;
+ void SignalFence(GPUVAddr addr, u32 value) override;
+ void ReleaseFences() override;
void FlushAndInvalidateRegion(VAddr addr, u64 size) override;
void FlushCommands() override;
void TickFrame() override;