aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjduncanator <1518948+jduncanator@users.noreply.github.com>2018-11-21 17:27:33 +1100
committergdkchan <gab.dark.100@gmail.com>2018-11-21 04:27:33 -0200
commit76e2d48eeedfbb5419c957d41478b8b1235f26e5 (patch)
treeedb5220588514c51f6c381519a1dc102f277d9c8
parentea35b3d1b07f10c75634f63e0133927cd5fe08ff (diff)
GPU: Allow depth textures to be loaded (#511)
Allow depth textures to be loaded when their component types do not match.
-rw-r--r--Ryujinx.Graphics/Texture/ImageUtils.cs8
1 files 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);