From a897b512981239c4b03e59e72b52a9dd6f652adb Mon Sep 17 00:00:00 2001 From: Gabriel A Date: Thu, 25 Apr 2024 23:47:23 -0300 Subject: [PATCH] Add support for bindless textures from storage buffer on Vulkan --- .../Translation/Optimizations/BindlessElimination.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs b/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs index 223215439f..4128af241b 100644 --- a/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs +++ b/src/Ryujinx.Graphics.Shader/Translation/Optimizations/BindlessElimination.cs @@ -66,9 +66,9 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations if (nvHandle.AsgOp is not Operation handleOp || handleOp.Inst != Instruction.Load || - handleOp.StorageKind != StorageKind.Input) + (handleOp.StorageKind != StorageKind.Input && handleOp.StorageKind != StorageKind.StorageBuffer)) { - // Right now, we only allow bindless access when the handle comes from a shader input. + // Right now, we only allow bindless access when the handle comes from a shader input or storage buffer. // This is an artificial limitation to prevent it from being used in cases where it // would have a large performance impact of loading all textures in the pool. // It might be removed in the future, if we can mitigate the performance impact.