mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-14 17:00:17 +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);
|
||||
}
|
||||
|
||||
public TextureDescriptor FindTextureDescriptor(AstTextureOperation texOp, out int descriptorIndex)
|
||||
public (TextureDescriptor, int) FindTextureDescriptor(AstTextureOperation texOp)
|
||||
{
|
||||
TextureDescriptor[] descriptors = Config.GetTextureDescriptors();
|
||||
|
||||
|
@ -82,13 +82,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
|||
descriptor.HandleIndex == texOp.Handle &&
|
||||
descriptor.Format == texOp.Format)
|
||||
{
|
||||
descriptorIndex = i;
|
||||
return descriptor;
|
||||
return (descriptor, i);
|
||||
}
|
||||
}
|
||||
|
||||
descriptorIndex = -1;
|
||||
return default;
|
||||
return (default, -1);
|
||||
}
|
||||
|
||||
private static int FindDescriptorIndex(TextureDescriptor[] array, AstTextureOperation texOp)
|
||||
|
|
|
@ -762,8 +762,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
|
|||
}
|
||||
else
|
||||
{
|
||||
SamplerType declarationType = context.FindTextureDescriptor(texOp, out int descriptorIndex).Type;
|
||||
bool hasLod = !declarationType.HasFlag(SamplerType.Multisample) && declarationType != SamplerType.TextureBuffer;
|
||||
(TextureDescriptor descriptor, int descriptorIndex) = context.FindTextureDescriptor(texOp);
|
||||
bool hasLod = !descriptor.Type.HasFlag(SamplerType.Multisample) && descriptor.Type != SamplerType.TextureBuffer;
|
||||
string texCall;
|
||||
|
||||
if (hasLod)
|
||||
|
|
Loading…
Reference in a new issue