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
@@ -38,7 +38,7 @@ namespace Ryujinx.Graphics.Vulkan
bool isDepthStencil = format.IsDepthOrStencil();
_device = device;
_attachments = new[] { view.GetImageViewForAttachment() };
_attachments = [view.GetImageViewForAttachment()];
_validColorAttachments = isDepthStencil ? 0u : 1u;
_baseAttachment = view;
@@ -48,7 +48,7 @@ namespace Ryujinx.Graphics.Vulkan
}
else
{
_colors = new TextureView[] { view };
_colors = [view];
_colorsCanonical = _colors;
}
@@ -56,9 +56,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();