aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
index 7d3d22d8..1b2673ab 100644
--- a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
+++ b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs
@@ -57,8 +57,6 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
InstTld op = context.GetOp<InstTld>();
- context.Config.SetUsedFeature(FeatureFlags.IntegerSampling);
-
var lod = op.Lod ? Lod.Ll : Lod.Lz;
EmitTex(context, TextureFlags.IntCoords, op.Dim, lod, op.TidB, op.WMask, op.SrcA, op.SrcB, op.Dest, op.Ms, false, op.Toff);
@@ -68,8 +66,6 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
InstTldB op = context.GetOp<InstTldB>();
- context.Config.SetUsedFeature(FeatureFlags.IntegerSampling);
-
var flags = TextureFlags.IntCoords | TextureFlags.Bindless;
var lod = op.Lod ? Lod.Ll : Lod.Lz;
@@ -224,7 +220,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
// For bindless, we don't have any way to know the texture type,
// so we assume it's texture buffer when the sampler type is 1D, since that's more common.
- bool isTypeBuffer = isBindless || context.Config.GpuAccessor.QuerySamplerType(imm) == SamplerType.TextureBuffer;
+ bool isTypeBuffer = isBindless || context.TranslatorContext.GpuAccessor.QuerySamplerType(imm) == SamplerType.TextureBuffer;
if (isTypeBuffer)
{
type = SamplerType.TextureBuffer;
@@ -386,7 +382,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
if (type == SamplerType.None)
{
- context.Config.GpuAccessor.Log("Invalid texture sampler type.");
+ context.TranslatorContext.GpuAccessor.Log("Invalid texture sampler type.");
return;
}
@@ -478,16 +474,14 @@ namespace Ryujinx.Graphics.Shader.Instructions
if (type == SamplerType.None)
{
- context.Config.GpuAccessor.Log("Invalid texel fetch sampler type.");
+ context.TranslatorContext.GpuAccessor.Log("Invalid texel fetch sampler type.");
return;
}
- context.Config.SetUsedFeature(FeatureFlags.IntegerSampling);
-
flags = ConvertTextureFlags(tldsOp.Target) | TextureFlags.IntCoords;
if (tldsOp.Target == TldsTarget.Texture1DLodZero &&
- context.Config.GpuAccessor.QuerySamplerType(tldsOp.TidB) == SamplerType.TextureBuffer)
+ context.TranslatorContext.GpuAccessor.QuerySamplerType(tldsOp.TidB) == SamplerType.TextureBuffer)
{
type = SamplerType.TextureBuffer;
flags &= ~TextureFlags.LodLevel;
@@ -884,7 +878,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
return Register(dest++, RegisterType.Gpr);
}
- int binding = isBindless ? 0 : context.Config.ResourceManager.GetTextureOrImageBinding(
+ int binding = isBindless ? 0 : context.ResourceManager.GetTextureOrImageBinding(
Instruction.Lod,
type,
TextureFormat.Unknown,
@@ -1065,8 +1059,6 @@ namespace Ryujinx.Graphics.Shader.Instructions
return;
}
- context.Config.SetUsedFeature(FeatureFlags.IntegerSampling);
-
Operand Ra()
{
if (srcA > RegisterConsts.RegisterZeroIndex)
@@ -1106,12 +1098,12 @@ namespace Ryujinx.Graphics.Shader.Instructions
}
else
{
- type = context.Config.GpuAccessor.QuerySamplerType(imm);
+ type = context.TranslatorContext.GpuAccessor.QuerySamplerType(imm);
}
TextureFlags flags = isBindless ? TextureFlags.Bindless : TextureFlags.None;
- int binding = isBindless ? 0 : context.Config.ResourceManager.GetTextureOrImageBinding(
+ int binding = isBindless ? 0 : context.ResourceManager.GetTextureOrImageBinding(
Instruction.TextureSize,
type,
TextureFormat.Unknown,
@@ -1147,7 +1139,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
Operand[] dests,
Operand[] sources)
{
- int binding = flags.HasFlag(TextureFlags.Bindless) ? 0 : context.Config.ResourceManager.GetTextureOrImageBinding(
+ int binding = flags.HasFlag(TextureFlags.Bindless) ? 0 : context.ResourceManager.GetTextureOrImageBinding(
Instruction.TextureSample,
type,
TextureFormat.Unknown,