mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-23 04:35:46 +00:00
GPU: Allow depth textures to be loaded (#511)
Allow depth textures to be loaded when their component types do not match.
This commit is contained in:
parent
ea35b3d1b0
commit
76e2d48eee
1 changed files with 5 additions and 5 deletions
|
@ -147,16 +147,16 @@ namespace Ryujinx.Graphics.Texture
|
||||||
GalTextureType AType,
|
GalTextureType AType,
|
||||||
bool ConvSrgb)
|
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))
|
if (!s_TextureTable.TryGetValue(Format, out GalImageFormat ImageFormat))
|
||||||
{
|
{
|
||||||
throw new NotImplementedException($"Format 0x{((int)Format):x} not implemented!");
|
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 FormatType = ConvSrgb ? Srgb : GetFormatType(RType);
|
||||||
|
|
||||||
GalImageFormat CombinedFormat = (ImageFormat & GalImageFormat.FormatMask) | FormatType;
|
GalImageFormat CombinedFormat = (ImageFormat & GalImageFormat.FormatMask) | FormatType;
|
||||||
|
|
Loading…
Reference in a new issue