GPU: Allow depth textures to be loaded

Allow depth textures to be loaded when their component types do not match.
This commit is contained in:
jduncanator 2018-11-21 12:44:50 +11:00
parent dc02ac08ca
commit e0572698f0

View file

@ -147,16 +147,16 @@ namespace Ryujinx.Graphics.Texture
GalTextureType AType,
bool ConvSrgb)
{
if (RType != GType || RType != BType || RType != AType)
{
throw new NotImplementedException("Per component types are not implemented!");
}
if (!s_TextureTable.TryGetValue(Format, out GalImageFormat ImageFormat))
{
throw new NotImplementedException($"Format 0x{((int)Format):x} not implemented!");
}
if (!HasDepth(ImageFormat) && (RType != GType || RType != BType || RType != AType))
{
throw new NotImplementedException($"Per component types are not implemented!");
}
GalImageFormat FormatType = ConvSrgb ? Srgb : GetFormatType(RType);
GalImageFormat CombinedFormat = (ImageFormat & GalImageFormat.FormatMask) | FormatType;