Do not throw for invalid ASTC compressed textures
This commit is contained in:
parent
769c02235f
commit
fd196b3d19
2 changed files with 31 additions and 13 deletions
|
@ -253,7 +253,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
|
||||
if (!_context.Capabilities.SupportsAstcCompression && _info.FormatInfo.Format.IsAstc())
|
||||
{
|
||||
data = AstcDecoder.DecodeToRgba8(
|
||||
if (!AstcDecoder.TryDecodeToRgba8(
|
||||
data,
|
||||
_info.FormatInfo.BlockWidth,
|
||||
_info.FormatInfo.BlockHeight,
|
||||
|
@ -261,7 +261,13 @@ namespace Ryujinx.Graphics.Gpu.Image
|
|||
_info.Width,
|
||||
_info.Height,
|
||||
_depth,
|
||||
_info.Levels);
|
||||
_info.Levels,
|
||||
out Span<byte> decoded))
|
||||
{
|
||||
// TODO: Error.
|
||||
}
|
||||
|
||||
data = decoded;
|
||||
}
|
||||
|
||||
HostTexture.SetData(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue