diff options
| author | snowstormxd <214507868+snowstormxd@users.noreply.github.com> | 2026-11-01 21:32:04 +0000 |
|---|---|---|
| committer | snowstormxd <214507868+snowstormxd@users.noreply.github.com> | 2026-11-02 18:58:54 +0000 |
| commit | b2430b4d90016eb6a221224687459c1876bc5552 (patch) | |
| tree | d0e23fa8b34294e2cd3533f5ed180af1eeaf4f11 /src/video_core/renderer_vulkan | |
| parent | 202c6b0356e1fa9366e5b9000df35a63f1eb9dc0 (diff) | |
shader_cache: batch memory-write invalidations without skipping ranges
Adapt the batching from ymatrix1/Eglantine PR #237, retaining all CPU invalidations. Acquire the lock once and remove pending shaders once per write batch. Compare real cache contents with sequential invalidation across randomized overlapping writes and pending removals.
Assisted-by: Codex (implementation, review, commit text and automated validation)
(cherry picked from commit b65f818d7789ffadfb58fe4543b18060fd88ce53)
Diffstat (limited to 'src/video_core/renderer_vulkan')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 978f8be547..dc34260de5 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -1127,12 +1127,10 @@ void RasterizerVulkan::InnerInvalidation(std::span<const std::pair<DAddr, std::s buffer_cache.WriteMemory(addr, size); } } - { - for (const auto& [addr, size] : sequences) { - query_cache.InvalidateRegion(addr, size); - pipeline_cache.InvalidateRegion(addr, size); - } + for (const auto& [addr, size] : sequences) { + query_cache.InvalidateRegion(addr, size); } + pipeline_cache.InvalidateRegions(sequences); } bool RasterizerVulkan::OnCPUWrite(DAddr addr, u64 size) { |
