From 76e2d48eeedfbb5419c957d41478b8b1235f26e5 Mon Sep 17 00:00:00 2001 From: jduncanator <1518948+jduncanator@users.noreply.github.com> Date: Wed, 21 Nov 2018 17:27:33 +1100 Subject: GPU: Allow depth textures to be loaded (#511) Allow depth textures to be loaded when their component types do not match. --- Ryujinx.Graphics/Texture/ImageUtils.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Ryujinx.Graphics/Texture/ImageUtils.cs b/Ryujinx.Graphics/Texture/ImageUtils.cs index 89c29557..417d7998 100644 --- a/Ryujinx.Graphics/Texture/ImageUtils.cs +++ b/Ryujinx.Graphics/Texture/ImageUtils.cs @@ -147,14 +147,14 @@ namespace Ryujinx.Graphics.Texture GalTextureType AType, bool ConvSrgb) { - if (RType != GType || RType != BType || RType != AType) + if (!s_TextureTable.TryGetValue(Format, out GalImageFormat ImageFormat)) { - throw new NotImplementedException("Per component types are not implemented!"); + throw new NotImplementedException($"Format 0x{((int)Format):x} not implemented!"); } - if (!s_TextureTable.TryGetValue(Format, out GalImageFormat ImageFormat)) + if (!HasDepth(ImageFormat) && (RType != GType || RType != BType || RType != AType)) { - throw new NotImplementedException($"Format 0x{((int)Format):x} not implemented!"); + throw new NotImplementedException($"Per component types are not implemented!"); } GalImageFormat FormatType = ConvSrgb ? Srgb : GetFormatType(RType); -- cgit v1.2.3