Simplify logic for bindless texture handling (#1667)
* Simplify logic for bindless texture handling * Nits
This commit is contained in:
parent
eda6b78894
commit
934a78005e
16 changed files with 131 additions and 191 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue