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

@ -39,7 +39,7 @@ namespace Ryujinx.Graphics.Vulkan
bool isDepthStencil = format.IsDepthOrStencil();
_device = device;
_attachments = new[] { view.GetImageViewForAttachment() };
_attachments = [view.GetImageViewForAttachment()];
_validColorAttachments = isDepthStencil ? 0u : 1u;
_baseAttachment = view;
@ -49,7 +49,7 @@ namespace Ryujinx.Graphics.Vulkan
}
else
{
_colors = new TextureView[] { view };
_colors = [view];
_colorsCanonical = _colors;
}
@ -57,9 +57,9 @@ namespace Ryujinx.Graphics.Vulkan
Height = height;
Layers = 1;
AttachmentSamples = new[] { (uint)view.Info.Samples };
AttachmentFormats = new[] { view.VkFormat };
AttachmentIndices = isDepthStencil ? Array.Empty<int>() : new[] { 0 };
AttachmentSamples = [(uint)view.Info.Samples];
AttachmentFormats = [view.VkFormat];
AttachmentIndices = isDepthStencil ? [] : [0];
AttachmentIntegerFormatMask = format.IsInteger() ? 1u : 0u;
LogicOpsAllowed = !format.IsFloatOrSrgb();