diff --git a/Ryujinx.Graphics/Gal/GalImageFormat.cs b/Ryujinx.Graphics/Gal/GalImageFormat.cs index 7a4faf245f..904de16118 100644 --- a/Ryujinx.Graphics/Gal/GalImageFormat.cs +++ b/Ryujinx.Graphics/Gal/GalImageFormat.cs @@ -24,6 +24,7 @@ BC5, Z24S8, ZF32, + Z16, ConvertedBegin, Astc2D4x4, diff --git a/Ryujinx.Graphics/Gal/ImageFormatConverter.cs b/Ryujinx.Graphics/Gal/ImageFormatConverter.cs index 1ed638b10e..09166cf66a 100644 --- a/Ryujinx.Graphics/Gal/ImageFormatConverter.cs +++ b/Ryujinx.Graphics/Gal/ImageFormatConverter.cs @@ -71,7 +71,9 @@ namespace Ryujinx.Graphics.Gal { switch (Format) { - case GalZetaFormat.Z32Float: return GalImageFormat.ZF32; + case GalZetaFormat.Z32Float: return GalImageFormat.ZF32; + case GalZetaFormat.S8Z24Unorm: return GalImageFormat.Z24S8; + case GalZetaFormat.Z16Unorm: return GalImageFormat.Z16; } throw new NotImplementedException(Format.ToString()); @@ -127,6 +129,7 @@ namespace Ryujinx.Graphics.Gal { case GalImageFormat.Z24S8: case GalImageFormat.ZF32: + case GalImageFormat.Z16: return true; } diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs index 840373684e..6a60a785d3 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLEnumConverter.cs @@ -141,6 +141,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL case GalImageFormat.R16: return (PixelInternalFormat.R16, PixelFormat.Red, PixelType.HalfFloat); case GalImageFormat.R8: return (PixelInternalFormat.R8, PixelFormat.Red, PixelType.UnsignedByte); case GalImageFormat.ZF32: return (PixelInternalFormat.DepthComponent32f, PixelFormat.DepthComponent, PixelType.Float); + case GalImageFormat.Z16: return (PixelInternalFormat.DepthComponent16, PixelFormat.DepthComponent, PixelType.HalfFloat); case GalImageFormat.BF10GF11RF11: return (PixelInternalFormat.R11fG11fB10f, PixelFormat.Rgb, PixelType.UnsignedInt10F11F11FRev); case GalImageFormat.Z24S8: return (PixelInternalFormat.Depth24Stencil8, PixelFormat.DepthStencil, PixelType.UnsignedInt248); } diff --git a/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs b/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs index c35cdcb092..bcfe4a7e25 100644 --- a/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs +++ b/Ryujinx.HLE/Gpu/Texture/TextureHelper.cs @@ -53,6 +53,7 @@ namespace Ryujinx.HLE.Gpu.Texture case GalImageFormat.B5G6R5: case GalImageFormat.G8R8: case GalImageFormat.R16: + case GalImageFormat.Z16: return Image.Width * Image.Height * 2; case GalImageFormat.R8: