[Ryujinx.Graphics.Gpu] Address dotnet-format issues (#5367)
* dotnet format style --severity info Some changes were manually reverted. * dotnet format analyzers --serverity info Some changes have been minimally adapted. * Restore a few unused methods and variables * Silence dotnet format IDE0060 warnings * Silence dotnet format IDE0052 warnings * Address dotnet format CA1816 warnings * Address or silence dotnet format CA1069 warnings * Address or silence dotnet format CA2211 warnings * Address remaining dotnet format analyzer warnings * Address review comments * Address most dotnet format whitespace warnings * Apply dotnet format whitespace formatting A few of them have been manually reverted and the corresponding warning was silenced * Format if-blocks correctly * Run dotnet format whitespace after rebase * Run dotnet format style after rebase * Another rebase, another dotnet format run * Run dotnet format style after rebase * Run dotnet format after rebase and remove unused usings - analyzers - style - whitespace * Disable 'prefer switch expression' rule * Add comments to disabled warnings * Remove a few unused parameters * Replace MmeShadowScratch with Array256<uint> * Simplify properties and array initialization, Use const when possible, Remove trailing commas * Start working on disabled warnings * Fix and silence a few dotnet-format warnings again * Run dotnet format after rebase * Address IDE0251 warnings * Silence IDE0060 in .editorconfig * Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas" This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e. * dotnet format whitespace after rebase * First pass of dotnet format * Add unsafe dotnet format changes * Fix typos * Add trailing commas * Disable formatting for FormatTable * Address review feedback
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
Astc10x8,
|
||||
Astc10x10,
|
||||
Astc12x10,
|
||||
Astc12x12
|
||||
Astc12x12,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -629,7 +629,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
{
|
||||
TextureMatchQuality.Perfect => TextureViewCompatibility.Full,
|
||||
TextureMatchQuality.FormatAlias => TextureViewCompatibility.FormatAlias,
|
||||
_ => TextureViewCompatibility.Incompatible
|
||||
_ => TextureViewCompatibility.Incompatible,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -783,80 +783,33 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
/// <returns>Format class</returns>
|
||||
private static FormatClass GetFormatClass(Format format)
|
||||
{
|
||||
switch (format)
|
||||
return format switch
|
||||
{
|
||||
case Format.Bc1RgbaSrgb:
|
||||
case Format.Bc1RgbaUnorm:
|
||||
return FormatClass.Bc1Rgba;
|
||||
case Format.Bc2Srgb:
|
||||
case Format.Bc2Unorm:
|
||||
return FormatClass.Bc2;
|
||||
case Format.Bc3Srgb:
|
||||
case Format.Bc3Unorm:
|
||||
return FormatClass.Bc3;
|
||||
case Format.Bc4Snorm:
|
||||
case Format.Bc4Unorm:
|
||||
return FormatClass.Bc4;
|
||||
case Format.Bc5Snorm:
|
||||
case Format.Bc5Unorm:
|
||||
return FormatClass.Bc5;
|
||||
case Format.Bc6HSfloat:
|
||||
case Format.Bc6HUfloat:
|
||||
return FormatClass.Bc6;
|
||||
case Format.Bc7Srgb:
|
||||
case Format.Bc7Unorm:
|
||||
return FormatClass.Bc7;
|
||||
case Format.Etc2RgbSrgb:
|
||||
case Format.Etc2RgbUnorm:
|
||||
return FormatClass.Etc2Rgb;
|
||||
case Format.Etc2RgbaSrgb:
|
||||
case Format.Etc2RgbaUnorm:
|
||||
return FormatClass.Etc2Rgba;
|
||||
case Format.Astc4x4Srgb:
|
||||
case Format.Astc4x4Unorm:
|
||||
return FormatClass.Astc4x4;
|
||||
case Format.Astc5x4Srgb:
|
||||
case Format.Astc5x4Unorm:
|
||||
return FormatClass.Astc5x4;
|
||||
case Format.Astc5x5Srgb:
|
||||
case Format.Astc5x5Unorm:
|
||||
return FormatClass.Astc5x5;
|
||||
case Format.Astc6x5Srgb:
|
||||
case Format.Astc6x5Unorm:
|
||||
return FormatClass.Astc6x5;
|
||||
case Format.Astc6x6Srgb:
|
||||
case Format.Astc6x6Unorm:
|
||||
return FormatClass.Astc6x6;
|
||||
case Format.Astc8x5Srgb:
|
||||
case Format.Astc8x5Unorm:
|
||||
return FormatClass.Astc8x5;
|
||||
case Format.Astc8x6Srgb:
|
||||
case Format.Astc8x6Unorm:
|
||||
return FormatClass.Astc8x6;
|
||||
case Format.Astc8x8Srgb:
|
||||
case Format.Astc8x8Unorm:
|
||||
return FormatClass.Astc8x8;
|
||||
case Format.Astc10x5Srgb:
|
||||
case Format.Astc10x5Unorm:
|
||||
return FormatClass.Astc10x5;
|
||||
case Format.Astc10x6Srgb:
|
||||
case Format.Astc10x6Unorm:
|
||||
return FormatClass.Astc10x6;
|
||||
case Format.Astc10x8Srgb:
|
||||
case Format.Astc10x8Unorm:
|
||||
return FormatClass.Astc10x8;
|
||||
case Format.Astc10x10Srgb:
|
||||
case Format.Astc10x10Unorm:
|
||||
return FormatClass.Astc10x10;
|
||||
case Format.Astc12x10Srgb:
|
||||
case Format.Astc12x10Unorm:
|
||||
return FormatClass.Astc12x10;
|
||||
case Format.Astc12x12Srgb:
|
||||
case Format.Astc12x12Unorm:
|
||||
return FormatClass.Astc12x12;
|
||||
}
|
||||
|
||||
return FormatClass.Unclassified;
|
||||
Format.Bc1RgbaSrgb or Format.Bc1RgbaUnorm => FormatClass.Bc1Rgba,
|
||||
Format.Bc2Srgb or Format.Bc2Unorm => FormatClass.Bc2,
|
||||
Format.Bc3Srgb or Format.Bc3Unorm => FormatClass.Bc3,
|
||||
Format.Bc4Snorm or Format.Bc4Unorm => FormatClass.Bc4,
|
||||
Format.Bc5Snorm or Format.Bc5Unorm => FormatClass.Bc5,
|
||||
Format.Bc6HSfloat or Format.Bc6HUfloat => FormatClass.Bc6,
|
||||
Format.Bc7Srgb or Format.Bc7Unorm => FormatClass.Bc7,
|
||||
Format.Etc2RgbSrgb or Format.Etc2RgbUnorm => FormatClass.Etc2Rgb,
|
||||
Format.Etc2RgbaSrgb or Format.Etc2RgbaUnorm => FormatClass.Etc2Rgba,
|
||||
Format.Astc4x4Srgb or Format.Astc4x4Unorm => FormatClass.Astc4x4,
|
||||
Format.Astc5x4Srgb or Format.Astc5x4Unorm => FormatClass.Astc5x4,
|
||||
Format.Astc5x5Srgb or Format.Astc5x5Unorm => FormatClass.Astc5x5,
|
||||
Format.Astc6x5Srgb or Format.Astc6x5Unorm => FormatClass.Astc6x5,
|
||||
Format.Astc6x6Srgb or Format.Astc6x6Unorm => FormatClass.Astc6x6,
|
||||
Format.Astc8x5Srgb or Format.Astc8x5Unorm => FormatClass.Astc8x5,
|
||||
Format.Astc8x6Srgb or Format.Astc8x6Unorm => FormatClass.Astc8x6,
|
||||
Format.Astc8x8Srgb or Format.Astc8x8Unorm => FormatClass.Astc8x8,
|
||||
Format.Astc10x5Srgb or Format.Astc10x5Unorm => FormatClass.Astc10x5,
|
||||
Format.Astc10x6Srgb or Format.Astc10x6Unorm => FormatClass.Astc10x6,
|
||||
Format.Astc10x8Srgb or Format.Astc10x8Unorm => FormatClass.Astc10x8,
|
||||
Format.Astc10x10Srgb or Format.Astc10x10Unorm => FormatClass.Astc10x10,
|
||||
Format.Astc12x10Srgb or Format.Astc12x10Unorm => FormatClass.Astc12x10,
|
||||
Format.Astc12x12Srgb or Format.Astc12x12Unorm => FormatClass.Astc12x12,
|
||||
_ => FormatClass.Unclassified,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user