From 86931cc3f1f781f8849651e658a222ca821040fa Mon Sep 17 00:00:00 2001 From: Domenico V <35856442+LDj3SNuD@users.noreply.github.com> Date: Mon, 31 Jul 2023 03:31:57 +0200 Subject: [PATCH] (Graphics.Shader): Handle EmitSuatom constant dests and EmitSuld zero dest reg. (#5504) * (Graphics.Shader): Handle EmitSuatom constant dests. * Proper fix for EmitSuatom; fix EmitSuld. --- .../Instructions/InstEmitSurface.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitSurface.cs b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitSurface.cs index 0b929307..6bf7de7f 100644 --- a/src/Ryujinx.Graphics.Shader/Instructions/InstEmitSurface.cs +++ b/src/Ryujinx.Graphics.Shader/Instructions/InstEmitSurface.cs @@ -218,7 +218,7 @@ namespace Ryujinx.Graphics.Shader.Instructions return context.Copy(Register(srcB++, RegisterType.Gpr)); } - Operand d = dest != RegisterConsts.RegisterZeroIndex ? Register(dest, RegisterType.Gpr) : null; + Operand d = Register(dest, RegisterType.Gpr); List sourcesList = new(); @@ -304,6 +304,11 @@ namespace Ryujinx.Graphics.Shader.Instructions bool byteAddress, bool isBindless) { + if (srcB == RegisterConsts.RegisterZeroIndex) + { + return; + } + context.Config.SetUsedFeature(FeatureFlags.IntegerSampling); SamplerType type = ConvertSamplerType(dimensions);