Przeglądaj źródła

GPU: Allow depth textures to be loaded (#511)

Allow depth textures to be loaded when their component types do not match.
jduncanator 7 lat temu
rodzic
commit
76e2d48eee
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      Ryujinx.Graphics/Texture/ImageUtils.cs

+ 4 - 4
Ryujinx.Graphics/Texture/ImageUtils.cs

@@ -147,14 +147,14 @@ namespace Ryujinx.Graphics.Texture
             GalTextureType   AType,
             GalTextureType   AType,
             bool             ConvSrgb)
             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);
             GalImageFormat FormatType = ConvSrgb ? Srgb : GetFormatType(RType);