aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-07-03 14:29:27 -0300
committerGitHub <noreply@github.com>2023-07-03 14:29:27 -0300
commit1c7a90ef359d9974e5bd257c4d8e9bf526a6966c (patch)
tree3ab1644927819b90b0aef78ed6749c6434150490 /src/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs
parent3b46bb73f781a011705ecbc8a1d3207dfb145829 (diff)
Stop identifying shader textures with handle and cbuf, use binding instead (#5266)1.1.952
* Stop identifying shader textures with handle and cbuf, use binding instead * Remove now unused code * Consider image operations as having accurate type information too I don't know why that was not the case before * Fix missing unscale on InsertCoordNormalization, stop calling SetUsageFlagsForTextureQuery when not needed * Shader cache version bump * Change get texture methods to return descriptors created from ResourceManager state This is required to ensure that reserved textures and images will not be bound as a guest texture/image * Fix BindlessElimination.SetHandle inserting coords at the wrong place
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs b/src/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs
index b467fe53..fa5550a6 100644
--- a/src/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs
+++ b/src/Ryujinx.Graphics.Shader/IntermediateRepresentation/TextureOperation.cs
@@ -8,16 +8,14 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
public TextureFormat Format { get; set; }
public TextureFlags Flags { get; private set; }
- public int CbufSlot { get; private set; }
- public int Handle { get; private set; }
+ public int Binding { get; private set; }
public TextureOperation(
Instruction inst,
SamplerType type,
TextureFormat format,
TextureFlags flags,
- int cbufSlot,
- int handle,
+ int binding,
int compIndex,
Operand[] dests,
Operand[] sources) : base(inst, compIndex, dests, sources)
@@ -25,30 +23,17 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
Type = type;
Format = format;
Flags = flags;
- CbufSlot = cbufSlot;
- Handle = handle;
+ Binding = binding;
}
- public TextureOperation(
- Instruction inst,
- SamplerType type,
- TextureFormat format,
- TextureFlags flags,
- int handle,
- int compIndex,
- Operand[] dests,
- Operand[] sources) : this(inst, type, format, flags, DefaultCbufSlot, handle, compIndex, dests, sources)
- {
- }
-
- public void TurnIntoIndexed(int handle)
+ public void TurnIntoIndexed(int binding)
{
Type |= SamplerType.Indexed;
Flags &= ~TextureFlags.Bindless;
- Handle = handle;
+ Binding = binding;
}
- public void SetHandle(int handle, int cbufSlot = DefaultCbufSlot)
+ public void SetBinding(int binding)
{
if ((Flags & TextureFlags.Bindless) != 0)
{
@@ -57,8 +42,7 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
RemoveSource(0);
}
- CbufSlot = cbufSlot;
- Handle = handle;
+ Binding = binding;
}
public void SetLodLevelFlag()