mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-14 22:40:18 +00:00
Replace out param with tuple return value
This commit is contained in:
parent
ef6a099392
commit
e15247fbc4
2 changed files with 5 additions and 7 deletions
|
@ -70,7 +70,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
||||||
AppendLine("}" + suffix);
|
AppendLine("}" + suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TextureDescriptor FindTextureDescriptor(AstTextureOperation texOp, out int descriptorIndex)
|
public (TextureDescriptor, int) FindTextureDescriptor(AstTextureOperation texOp)
|
||||||
{
|
{
|
||||||
TextureDescriptor[] descriptors = Config.GetTextureDescriptors();
|
TextureDescriptor[] descriptors = Config.GetTextureDescriptors();
|
||||||
|
|
||||||
|
@ -82,13 +82,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
||||||
descriptor.HandleIndex == texOp.Handle &&
|
descriptor.HandleIndex == texOp.Handle &&
|
||||||
descriptor.Format == texOp.Format)
|
descriptor.Format == texOp.Format)
|
||||||
{
|
{
|
||||||
descriptorIndex = i;
|
return (descriptor, i);
|
||||||
return descriptor;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
descriptorIndex = -1;
|
return (default, -1);
|
||||||
return default;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int FindDescriptorIndex(TextureDescriptor[] array, AstTextureOperation texOp)
|
private static int FindDescriptorIndex(TextureDescriptor[] array, AstTextureOperation texOp)
|
||||||
|
|
|
@ -762,8 +762,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SamplerType declarationType = context.FindTextureDescriptor(texOp, out int descriptorIndex).Type;
|
(TextureDescriptor descriptor, int descriptorIndex) = context.FindTextureDescriptor(texOp);
|
||||||
bool hasLod = !declarationType.HasFlag(SamplerType.Multisample) && declarationType != SamplerType.TextureBuffer;
|
bool hasLod = !descriptor.Type.HasFlag(SamplerType.Multisample) && descriptor.Type != SamplerType.TextureBuffer;
|
||||||
string texCall;
|
string texCall;
|
||||||
|
|
||||||
if (hasLod)
|
if (hasLod)
|
||||||
|
|
Loading…
Reference in a new issue