From 31ed061beae779b0a750e1344c76a75af8275f91 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Sat, 17 Feb 2024 03:21:37 +0000 Subject: Vulkan: Improve texture barrier usage, timing and batching (#6240) * WIP barrier batch * Add store op to image usage barrier * Dispose the barrier batch * Fix encoding? * Handle read and write on the load op barrier. Load op consumes read accesses but does not add one, as the only other operation that can read is another load. * Simplify null check * Insert barriers on program change in case stale bindings are reintroduced * Not sure how I messed this one up * Improve location of bindings barrier update This is also important for emergency deferred clear * Update src/Ryujinx.Graphics.Vulkan/BarrierBatch.cs Co-authored-by: Mary Guillemard --------- Co-authored-by: Mary Guillemard --- src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Ryujinx.Graphics.Gpu/Image') diff --git a/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs b/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs index 963bd947..ef5d0dea 100644 --- a/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs +++ b/src/Ryujinx.Graphics.Gpu/Image/TextureBindingsManager.cs @@ -634,7 +634,7 @@ namespace Ryujinx.Graphics.Gpu.Image state.Texture = hostTextureRebind; state.ImageFormat = format; - _context.Renderer.Pipeline.SetImage(bindingInfo.Binding, hostTextureRebind, format); + _context.Renderer.Pipeline.SetImage(stage, bindingInfo.Binding, hostTextureRebind, format); } continue; @@ -692,7 +692,7 @@ namespace Ryujinx.Graphics.Gpu.Image state.ImageFormat = format; - _context.Renderer.Pipeline.SetImage(bindingInfo.Binding, hostTexture, format); + _context.Renderer.Pipeline.SetImage(stage, bindingInfo.Binding, hostTexture, format); } state.CachedTexture = texture; -- cgit v1.2.3