aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.OpenGL/FormatTable.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2024-02-15 19:06:26 -0300
committerGitHub <noreply@github.com>2024-02-15 19:06:26 -0300
commite37735ed2630a807c709d2d3e2099f6c1f2b10fe (patch)
treef6a85a9361c0e340551154b72b335e5bb81dcaf5 /src/Ryujinx.Graphics.OpenGL/FormatTable.cs
parent74a18b7c1820ae2094894cd2108c8c3a9bc03260 (diff)
Implement X8Z24 texture format (#6315)1.1.1197
Diffstat (limited to 'src/Ryujinx.Graphics.OpenGL/FormatTable.cs')
-rw-r--r--src/Ryujinx.Graphics.OpenGL/FormatTable.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.OpenGL/FormatTable.cs b/src/Ryujinx.Graphics.OpenGL/FormatTable.cs
index c7e3e4e2..4cf4dc76 100644
--- a/src/Ryujinx.Graphics.OpenGL/FormatTable.cs
+++ b/src/Ryujinx.Graphics.OpenGL/FormatTable.cs
@@ -68,6 +68,7 @@ namespace Ryujinx.Graphics.OpenGL
Add(Format.S8Uint, new FormatInfo(1, false, false, All.StencilIndex8, PixelFormat.StencilIndex, PixelType.UnsignedByte));
Add(Format.D16Unorm, new FormatInfo(1, false, false, All.DepthComponent16, PixelFormat.DepthComponent, PixelType.UnsignedShort));
Add(Format.S8UintD24Unorm, new FormatInfo(1, false, false, All.Depth24Stencil8, PixelFormat.DepthStencil, PixelType.UnsignedInt248));
+ Add(Format.X8UintD24Unorm, new FormatInfo(1, false, false, All.DepthComponent24, PixelFormat.DepthComponent, PixelType.UnsignedInt));
Add(Format.D32Float, new FormatInfo(1, false, false, All.DepthComponent32f, PixelFormat.DepthComponent, PixelType.Float));
Add(Format.D24UnormS8Uint, new FormatInfo(1, false, false, All.Depth24Stencil8, PixelFormat.DepthStencil, PixelType.UnsignedInt248));
Add(Format.D32FloatS8Uint, new FormatInfo(1, false, false, All.Depth32fStencil8, PixelFormat.DepthStencil, PixelType.Float32UnsignedInt248Rev));
@@ -224,5 +225,17 @@ namespace Ryujinx.Graphics.OpenGL
{
return _tableImage[(int)format];
}
+
+ public static bool IsPackedDepthStencil(Format format)
+ {
+ return format == Format.D24UnormS8Uint ||
+ format == Format.D32FloatS8Uint ||
+ format == Format.S8UintD24Unorm;
+ }
+
+ public static bool IsDepthOnly(Format format)
+ {
+ return format == Format.D16Unorm || format == Format.D32Float || format == Format.X8UintD24Unorm;
+ }
}
}