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 --- Ryujinx.Graphics.Shader/StructuredIr/AstTextureOperation.cs | 11 +++++++---- Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'Ryujinx.Graphics.Shader/StructuredIr') diff --git a/Ryujinx.Graphics.Shader/StructuredIr/AstTextureOperation.cs b/Ryujinx.Graphics.Shader/StructuredIr/AstTextureOperation.cs index 7261b9ff..d6d40732 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/AstTextureOperation.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/AstTextureOperation.cs @@ -7,19 +7,22 @@ namespace Ryujinx.Graphics.Shader.StructuredIr public SamplerType Type { get; } public TextureFlags Flags { get; } - public int Handle { get; } + public int Handle { get; } + public int ArraySize { get; } public AstTextureOperation( Instruction inst, SamplerType type, TextureFlags flags, int handle, + int arraySize, int compMask, params IAstNode[] sources) : base(inst, compMask, sources) { - Type = type; - Flags = flags; - Handle = handle; + Type = type; + Flags = flags; + Handle = handle; + ArraySize = arraySize; } } } \ No newline at end of file diff --git a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs index c4ffbe1a..ef8443ab 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs @@ -60,6 +60,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr texOp.Type, texOp.Flags, texOp.Handle, + 4, // TODO: Non-hardcoded array size. componentMask, sources); } -- cgit v1.2.3