aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.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/Image/TextureCopy.cs
parent74a18b7c1820ae2094894cd2108c8c3a9bc03260 (diff)
Implement X8Z24 texture format (#6315)1.1.1197
Diffstat (limited to 'src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.cs')
-rw-r--r--src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.cs11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.cs b/src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.cs
index 128f481f..89bd5e4f 100644
--- a/src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.cs
+++ b/src/Ryujinx.Graphics.OpenGL/Image/TextureCopy.cs
@@ -294,7 +294,7 @@ namespace Ryujinx.Graphics.OpenGL.Image
{
return FramebufferAttachment.DepthStencilAttachment;
}
- else if (IsDepthOnly(format))
+ else if (FormatTable.IsDepthOnly(format))
{
return FramebufferAttachment.DepthAttachment;
}
@@ -324,11 +324,11 @@ namespace Ryujinx.Graphics.OpenGL.Image
private static ClearBufferMask GetMask(Format format)
{
- if (format == Format.D24UnormS8Uint || format == Format.D32FloatS8Uint || format == Format.S8UintD24Unorm)
+ if (FormatTable.IsPackedDepthStencil(format))
{
return ClearBufferMask.DepthBufferBit | ClearBufferMask.StencilBufferBit;
}
- else if (IsDepthOnly(format))
+ else if (FormatTable.IsDepthOnly(format))
{
return ClearBufferMask.DepthBufferBit;
}
@@ -342,11 +342,6 @@ namespace Ryujinx.Graphics.OpenGL.Image
}
}
- private static bool IsDepthOnly(Format format)
- {
- return format == Format.D16Unorm || format == Format.D32Float;
- }
-
public TextureView BgraSwap(TextureView from)
{
TextureView to = (TextureView)_renderer.CreateTexture(from.Info);