From f260a61d2695188cd01b587968f29b1ee475b67a Mon Sep 17 00:00:00 2001 From: Lander Gallastegi Date: Mon, 28 Apr 2025 21:35:10 +0200 Subject: [PATCH] Only sync in the first time we see a readconst Thsi is partialy wrong. We need to save the state into the submission context itself, not the rasterizer since we can yield and process another sumission (if im not understanding wrong). --- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 69f7f6f74..155d78a3f 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -456,6 +456,8 @@ bool Rasterizer::BindResources(const Pipeline* pipeline) { buffer_infos.clear(); image_infos.clear(); + bool fault_enable = false; + // Bind resource buffers and textures. Shader::Backend::Bindings binding{}; Shader::PushData push_data = MakeUserData(liverpool->regs); @@ -467,12 +469,13 @@ bool Rasterizer::BindResources(const Pipeline* pipeline) { BindBuffers(*stage, binding, push_data); BindTextures(*stage, binding); - fault_process_pending |= stage->dma_types != Shader::IR::Type::Void; + fault_enable |= stage->dma_types != Shader::IR::Type::Void; } pipeline->BindResources(set_writes, buffer_barriers, push_data); - if (fault_process_pending) { + if (!fault_process_pending && fault_enable) { + fault_process_pending = true; // We only use fault buffer for DMA right now. // First, import any queued host memory, then sync every mapped // region that is cached on GPU memory.