misc: chore: Use collection expressions in Vulkan project

This commit is contained in:
Evan Husted 2025-01-26 15:32:25 -06:00
parent 9cb3b40ffc
commit ed2590a8ac
32 changed files with 212 additions and 240 deletions

View file

@ -168,7 +168,7 @@ namespace Ryujinx.Graphics.Vulkan
// If binding 3 is immediately used, use an alternate set of reserved bindings.
ReadOnlyCollection<ResourceUsage> uniformUsage = layout.SetUsages[0].Usages;
bool hasBinding3 = uniformUsage.Any(x => x.Binding == 3);
int[] reserved = isCompute ? Array.Empty<int>() : gd.GetPushDescriptorReservedBindings(hasBinding3);
int[] reserved = isCompute ? [] : gd.GetPushDescriptorReservedBindings(hasBinding3);
// Can't use any of the reserved usages.
for (int i = 0; i < uniformUsage.Count; i++)
@ -249,7 +249,7 @@ namespace Ryujinx.Graphics.Vulkan
for (int setIndex = 0; setIndex < sets.Count; setIndex++)
{
List<ResourceBindingSegment> currentSegments = new();
List<ResourceBindingSegment> currentSegments = [];
ResourceDescriptor currentDescriptor = default;
int currentCount = 0;
@ -307,7 +307,7 @@ namespace Ryujinx.Graphics.Vulkan
for (int setIndex = 0; setIndex < setUsages.Count; setIndex++)
{
List<ResourceBindingSegment> currentSegments = new();
List<ResourceBindingSegment> currentSegments = [];
ResourceUsage currentUsage = default;
int currentCount = 0;