misc: chore: Use collection expressions

This commit is contained in:
KeatonTheBot
2025-03-06 20:46:29 -06:00
parent 4d5757417e
commit e2973a875a
236 changed files with 9843 additions and 7561 deletions
@@ -383,10 +383,9 @@ namespace Ryujinx.Graphics.Shader.Translation
if (IsTransformFeedbackEmulated)
{
StructureType tfeDataStruct = new(new StructureField[]
{
StructureType tfeDataStruct = new([
new StructureField(AggregateType.Array | AggregateType.U32, "data", 0)
});
]);
for (int i = 0; i < ResourceReservations.TfeBuffersCount; i++)
{
@@ -402,10 +401,9 @@ namespace Ryujinx.Graphics.Shader.Translation
BufferDefinition vertexInfoBuffer = new(BufferLayout.Std140, 0, vertexInfoCbBinding, "vb_info", VertexInfoBuffer.GetStructureType());
resourceManager.Properties.AddOrUpdateConstantBuffer(vertexInfoBuffer);
StructureType vertexOutputStruct = new(new StructureField[]
{
StructureType vertexOutputStruct = new([
new StructureField(AggregateType.Array | AggregateType.FP32, "data", 0)
});
]);
int vertexOutputSbBinding = resourceManager.Reservations.VertexOutputStorageBufferBinding;
BufferDefinition vertexOutputBuffer = new(BufferLayout.Std430, 1, vertexOutputSbBinding, "vertex_output", vertexOutputStruct);
@@ -439,10 +437,9 @@ namespace Ryujinx.Graphics.Shader.Translation
BufferDefinition geometryVbOutputBuffer = new(BufferLayout.Std430, 1, geometryVbOutputSbBinding, "geometry_vb_output", vertexOutputStruct);
resourceManager.Properties.AddOrUpdateStorageBuffer(geometryVbOutputBuffer);
StructureType geometryIbOutputStruct = new(new StructureField[]
{
StructureType geometryIbOutputStruct = new([
new StructureField(AggregateType.Array | AggregateType.U32, "data", 0)
});
]);
int geometryIbOutputSbBinding = resourceManager.Reservations.GeometryIndexOutputStorageBufferBinding;
BufferDefinition geometryIbOutputBuffer = new(BufferLayout.Std430, 1, geometryIbOutputSbBinding, "geometry_ib_output", geometryIbOutputStruct);
@@ -499,10 +496,9 @@ namespace Ryujinx.Graphics.Shader.Translation
resourceManager.Properties.AddOrUpdateConstantBuffer(vertexInfoBuffer);
}
StructureType vertexInputStruct = new(new StructureField[]
{
StructureType vertexInputStruct = new([
new StructureField(AggregateType.Array | AggregateType.FP32, "data", 0)
});
]);
int vertexDataSbBinding = reservations.VertexOutputStorageBufferBinding;
BufferDefinition vertexOutputBuffer = new(BufferLayout.Std430, 1, vertexDataSbBinding, "vb_input", vertexInputStruct);
@@ -565,7 +561,7 @@ namespace Ryujinx.Graphics.Shader.Translation
};
return Generate(
new[] { function },
[function],
attributeUsage,
definitions,
definitions,
@@ -661,7 +657,7 @@ namespace Ryujinx.Graphics.Shader.Translation
maxOutputVertices);
return Generate(
new[] { function },
[function],
attributeUsage,
definitions,
definitions,