diff options
| author | riperiperi <rhy3756547@hotmail.com> | 2020-09-11 00:48:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-11 09:48:48 +1000 |
| commit | 3d055da5fc77f462e9c7099e08570213c0220cd4 (patch) | |
| tree | 0f1fea8ba0385ff4672b783fd536e35bb91a2069 /Ryujinx.Graphics.GAL/Format.cs | |
| parent | 5d69d9103ef423719619658dc3378869692a5064 (diff) | |
Allow swizzles to match with "undefined" components (#1538)
* Add swizzle matching rules.
Improves rules which try to match incompatible formats as perfect, such as D32 float -> R32 float.
Remove Format.HasOneComponent, since this information is now available via the FormatInfo struct.
* Fix this rule.
* Update component counts for depth formats.
Diffstat (limited to 'Ryujinx.Graphics.GAL/Format.cs')
| -rw-r--r-- | Ryujinx.Graphics.GAL/Format.cs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/Ryujinx.Graphics.GAL/Format.cs b/Ryujinx.Graphics.GAL/Format.cs index a6667361..a4e434b1 100644 --- a/Ryujinx.Graphics.GAL/Format.cs +++ b/Ryujinx.Graphics.GAL/Format.cs @@ -341,38 +341,5 @@ namespace Ryujinx.Graphics.GAL { return format.IsUint() || format.IsSint(); } - - /// <summary> - /// Checks if the texture format only has one component. - /// </summary> - /// <param name="format">Texture format</param> - /// <returns>True if the texture format only has one component, false otherwise</returns> - public static bool HasOneComponent(this Format format) - { - switch (format) - { - case Format.R8Unorm: - case Format.R8Snorm: - case Format.R8Uint: - case Format.R8Sint: - case Format.R16Float: - case Format.R16Unorm: - case Format.R16Snorm: - case Format.R16Uint: - case Format.R16Sint: - case Format.R32Float: - case Format.R32Uint: - case Format.R32Sint: - case Format.R8Uscaled: - case Format.R8Sscaled: - case Format.R16Uscaled: - case Format.R16Sscaled: - case Format.R32Uscaled: - case Format.R32Sscaled: - return true; - } - - return false; - } } }
\ No newline at end of file |
