From 934a78005e75653529c320cf90e78fe6536447c2 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Mon, 9 Nov 2020 19:35:04 -0300 Subject: Simplify logic for bindless texture handling (#1667) * Simplify logic for bindless texture handling * Nits --- Ryujinx.Graphics.Gpu/Engine/Methods.cs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Engine/Methods.cs') diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index 8bc2c22d..ef073a25 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -1024,14 +1024,12 @@ namespace Ryujinx.Graphics.Gpu.Engine Target target = ShaderTexture.GetTarget(descriptor.Type); - if (descriptor.IsBindless) - { - textureBindings[index] = new TextureBindingInfo(target, descriptor.Binding, descriptor.CbufSlot, descriptor.CbufOffset, descriptor.Flags); - } - else - { - textureBindings[index] = new TextureBindingInfo(target, descriptor.Binding, descriptor.HandleIndex, descriptor.Flags); - } + textureBindings[index] = new TextureBindingInfo( + target, + descriptor.Binding, + descriptor.CbufSlot, + descriptor.HandleIndex, + descriptor.Flags); } TextureManager.SetGraphicsTextures(stage, textureBindings); @@ -1045,7 +1043,13 @@ namespace Ryujinx.Graphics.Gpu.Engine Target target = ShaderTexture.GetTarget(descriptor.Type); Format format = ShaderTexture.GetFormat(descriptor.Format); - imageBindings[index] = new TextureBindingInfo(target, format, descriptor.Binding, descriptor.HandleIndex, descriptor.Flags); + imageBindings[index] = new TextureBindingInfo( + target, + format, + descriptor.Binding, + descriptor.CbufSlot, + descriptor.HandleIndex, + descriptor.Flags); } TextureManager.SetGraphicsImages(stage, imageBindings); -- cgit v1.2.3