mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-05 20:48:56 +02:00
misc: chore: Use collection expressions
This commit is contained in:
@@ -10,8 +10,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
/// </summary>
|
||||
struct SamplerDescriptor
|
||||
{
|
||||
private static readonly float[] _f5ToF32ConversionLut = new float[]
|
||||
{
|
||||
private static readonly float[] _f5ToF32ConversionLut =
|
||||
[
|
||||
0.0f,
|
||||
0.055555556f,
|
||||
0.1f,
|
||||
@@ -43,13 +43,13 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
0.45833334f,
|
||||
0.46153846f,
|
||||
0.4642857f,
|
||||
0.46666667f,
|
||||
};
|
||||
0.46666667f
|
||||
];
|
||||
|
||||
private static readonly float[] _maxAnisotropyLut = new float[]
|
||||
{
|
||||
1, 2, 4, 6, 8, 10, 12, 16,
|
||||
};
|
||||
private static readonly float[] _maxAnisotropyLut =
|
||||
[
|
||||
1, 2, 4, 6, 8, 10, 12, 16
|
||||
];
|
||||
|
||||
private const float Frac8ToF32 = 1.0f / 256.0f;
|
||||
|
||||
|
||||
@@ -103,11 +103,11 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
|
||||
for (int stage = 0; stage < stages; stage++)
|
||||
{
|
||||
_textureBindings[stage] = Array.Empty<TextureBindingInfo>();
|
||||
_imageBindings[stage] = Array.Empty<TextureBindingInfo>();
|
||||
_textureBindings[stage] = [];
|
||||
_imageBindings[stage] = [];
|
||||
}
|
||||
|
||||
_textureCounts = Array.Empty<int>();
|
||||
_textureCounts = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1315,7 +1315,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
|
||||
if (_isBuffer)
|
||||
{
|
||||
handles = Array.Empty<TextureGroupHandle>();
|
||||
handles = [];
|
||||
}
|
||||
else if (!(_hasMipViews || _hasLayerViews))
|
||||
{
|
||||
@@ -1339,7 +1339,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
|
||||
var groupHandle = new TextureGroupHandle(this, 0, Storage.Size, _views, 0, 0, 0, _allOffsets.Length, cpuRegionHandles);
|
||||
|
||||
handles = new TextureGroupHandle[] { groupHandle };
|
||||
handles = [groupHandle];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user