mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-25 01:57:11 +02:00
misc: chore: Fix object creation in Shader project
This commit is contained in:
parent
7f5a356c3d
commit
ccef0b49eb
10 changed files with 37 additions and 37 deletions
|
@ -16,7 +16,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
|
|||
|
||||
bool isArray = (texOp.Type & SamplerType.Array) != 0;
|
||||
|
||||
StringBuilder texCallBuilder = new StringBuilder();
|
||||
StringBuilder texCallBuilder = new();
|
||||
|
||||
if (texOp.Inst == Instruction.ImageAtomic)
|
||||
{
|
||||
|
|
|
@ -157,7 +157,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||
|
||||
bool isArray = (texOp.Type & SamplerType.Array) != 0;
|
||||
|
||||
StringBuilder texCallBuilder = new StringBuilder();
|
||||
StringBuilder texCallBuilder = new();
|
||||
|
||||
int srcIndex = 0;
|
||||
|
||||
|
@ -194,7 +194,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||
|
||||
texCallBuilder.Append('(');
|
||||
|
||||
StringBuilder coordsBuilder = new StringBuilder();
|
||||
StringBuilder coordsBuilder = new();
|
||||
|
||||
int coordsCount = texOp.Type.GetDimensions();
|
||||
|
||||
|
@ -352,7 +352,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||
bool isArray = (texOp.Type & SamplerType.Array) != 0;
|
||||
bool isShadow = (texOp.Type & SamplerType.Shadow) != 0;
|
||||
|
||||
StringBuilder texCallBuilder = new StringBuilder();
|
||||
StringBuilder texCallBuilder = new();
|
||||
|
||||
bool colorIsVector = isGather || !isShadow;
|
||||
|
||||
|
@ -589,7 +589,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||
{
|
||||
AstTextureOperation texOp = (AstTextureOperation)operation;
|
||||
|
||||
StringBuilder texCallBuilder = new StringBuilder();
|
||||
StringBuilder texCallBuilder = new();
|
||||
|
||||
int srcIndex = 0;
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
|||
}
|
||||
|
||||
string funcPrefix = $"{funcKeyword} {returnType} {funcName ?? function.Name}(";
|
||||
string indent = new string(' ', funcPrefix.Length);
|
||||
string indent = new(' ', funcPrefix.Length);
|
||||
|
||||
return $"{funcPrefix}{string.Join($", \n{indent}", args)})";
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
|
||||
public Instruction[] GetMainInterface()
|
||||
{
|
||||
List<Instruction> mainInterface = new List<Instruction>();
|
||||
List<Instruction> mainInterface = new();
|
||||
|
||||
mainInterface.AddRange(Inputs.Values);
|
||||
mainInterface.AddRange(Outputs.Values);
|
||||
|
|
|
@ -1327,7 +1327,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
compIdx = Src(AggregateType.S32);
|
||||
}
|
||||
|
||||
List<SpvInstruction> operandsList = new List<SpvInstruction>();
|
||||
List<SpvInstruction> operandsList = new();
|
||||
ImageOperandsMask operandsMask = ImageOperandsMask.MaskNone;
|
||||
|
||||
if (hasLodBias)
|
||||
|
@ -1754,7 +1754,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
|
||||
storageClass = isOutput ? StorageClass.Output : StorageClass.Input;
|
||||
|
||||
IoDefinition ioDefinition = new IoDefinition(storageKind, ioVariable, location, component);
|
||||
IoDefinition ioDefinition = new(storageKind, ioVariable, location, component);
|
||||
Dictionary<IoDefinition, SpvInstruction> dict = isPerPatch
|
||||
? (isOutput ? context.OutputsPerPatch : context.InputsPerPatch)
|
||||
: (isOutput ? context.Outputs : context.Inputs);
|
||||
|
@ -1843,7 +1843,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
(_, AggregateType varType) = IoMap.GetSpirvBuiltIn(ioVariable);
|
||||
varType &= AggregateType.ElementTypeMask;
|
||||
|
||||
IoDefinition ioDefinition = new IoDefinition(StorageKind.Input, ioVariable);
|
||||
IoDefinition ioDefinition = new(StorageKind.Input, ioVariable);
|
||||
|
||||
return context.Load(context.GetType(varType), context.Inputs[ioDefinition]);
|
||||
}
|
||||
|
|
|
@ -307,7 +307,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
|
|||
{
|
||||
AstBlockVisitor visitor = new(block);
|
||||
|
||||
Dictionary<AstBlock, (SpvInstruction, SpvInstruction)> loopTargets = new Dictionary<AstBlock, (SpvInstruction, SpvInstruction)>();
|
||||
Dictionary<AstBlock, (SpvInstruction, SpvInstruction)> loopTargets = new();
|
||||
|
||||
context.LoopTargets = loopTargets;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue