From 3ab5c23f492183ae6f5cf8f62c4239bf181d2630 Mon Sep 17 00:00:00 2001 From: gdk Date: Sat, 2 Nov 2019 23:07:21 -0300 Subject: Add partial support for array of samplers, and add pass to identify them from bindless texture accesses --- .../IntermediateRepresentation/TextureOperation.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'Ryujinx.Graphics.Shader/IntermediateRepresentation') diff --git a/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs b/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs index b96c55e8..718d2c2e 100644 --- a/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs +++ b/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs @@ -2,10 +2,10 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation { class TextureOperation : Operation { - public SamplerType Type { get; } - public TextureFlags Flags { get; } + public SamplerType Type { get; private set; } + public TextureFlags Flags { get; private set; } - public int Handle { get; } + public int Handle { get; private set; } public TextureOperation( Instruction inst, @@ -20,5 +20,14 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation Flags = flags; Handle = handle; } + + public void TurnIntoIndexed(int handle) + { + Type |= SamplerType.Indexed; + + Flags &= ~TextureFlags.Bindless; + + Handle = handle; + } } } \ No newline at end of file -- cgit v1.2.3