aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.GAL
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.GAL')
-rw-r--r--Ryujinx.Graphics.GAL/Capabilities.cs6
-rw-r--r--Ryujinx.Graphics.GAL/Format.cs21
2 files changed, 27 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.GAL/Capabilities.cs b/Ryujinx.Graphics.GAL/Capabilities.cs
index bc93908b..abacdcfa 100644
--- a/Ryujinx.Graphics.GAL/Capabilities.cs
+++ b/Ryujinx.Graphics.GAL/Capabilities.cs
@@ -18,7 +18,9 @@ namespace Ryujinx.Graphics.GAL
public readonly bool Supports3DTextureCompression;
public readonly bool SupportsBgraFormat;
public readonly bool SupportsR4G4Format;
+ public readonly bool SupportsR4G4B4A4Format;
public readonly bool SupportsSnormBufferTextureFormat;
+ public readonly bool Supports5BitComponentFormat;
public readonly bool SupportsFragmentShaderInterlock;
public readonly bool SupportsFragmentShaderOrderingIntel;
public readonly bool SupportsGeometryShaderPassthrough;
@@ -55,7 +57,9 @@ namespace Ryujinx.Graphics.GAL
bool supports3DTextureCompression,
bool supportsBgraFormat,
bool supportsR4G4Format,
+ bool supportsR4G4B4A4Format,
bool supportsSnormBufferTextureFormat,
+ bool supports5BitComponentFormat,
bool supportsFragmentShaderInterlock,
bool supportsFragmentShaderOrderingIntel,
bool supportsGeometryShaderPassthrough,
@@ -89,7 +93,9 @@ namespace Ryujinx.Graphics.GAL
Supports3DTextureCompression = supports3DTextureCompression;
SupportsBgraFormat = supportsBgraFormat;
SupportsR4G4Format = supportsR4G4Format;
+ SupportsR4G4B4A4Format = supportsR4G4B4A4Format;
SupportsSnormBufferTextureFormat = supportsSnormBufferTextureFormat;
+ Supports5BitComponentFormat = supports5BitComponentFormat;
SupportsFragmentShaderInterlock = supportsFragmentShaderInterlock;
SupportsFragmentShaderOrderingIntel = supportsFragmentShaderOrderingIntel;
SupportsGeometryShaderPassthrough = supportsGeometryShaderPassthrough;
diff --git a/Ryujinx.Graphics.GAL/Format.cs b/Ryujinx.Graphics.GAL/Format.cs
index 87d08803..5e0274e5 100644
--- a/Ryujinx.Graphics.GAL/Format.cs
+++ b/Ryujinx.Graphics.GAL/Format.cs
@@ -449,6 +449,27 @@ namespace Ryujinx.Graphics.GAL
}
/// <summary>
+ /// Checks if the texture format is 16 bit packed.
+ /// </summary>
+ /// <param name="format">Texture format</param>
+ /// <returns>True if the texture format is 16 bit packed, false otherwise</returns>
+ public static bool Is16BitPacked(this Format format)
+ {
+ switch (format)
+ {
+ case Format.B5G6R5Unorm:
+ case Format.B5G5R5A1Unorm:
+ case Format.R5G5B5X1Unorm:
+ case Format.R5G5B5A1Unorm:
+ case Format.R5G6B5Unorm:
+ case Format.R4G4B4A4Unorm:
+ return true;
+ }
+
+ return false;
+ }
+
+ /// <summary>
/// Checks if the texture format is an ASTC format.
/// </summary>
/// <param name="format">Texture format</param>