ASTC optimizations (#845)

* ASTC optimizations

* Move code to Ryujinx.Common

* Support 3D textures

* Address feedback

* Remove ASTC logging

* Use stackalloc instead of a Buffer20 struct

* Code style and cleanup

* Respond to feedback

* Rearrange public/private property ordering
This commit is contained in:
Alex Barney 2019-12-26 23:09:49 -07:00 committed by Thog
parent 947e14d3be
commit d1ab9fb42c
12 changed files with 1009 additions and 599 deletions

View file

@ -7,6 +7,7 @@ using Ryujinx.Graphics.Texture.Astc;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Ryujinx.Common.Logging;
namespace Ryujinx.Graphics.Gpu.Image
{
@ -246,7 +247,7 @@ namespace Ryujinx.Graphics.Gpu.Image
if (!_context.Capabilities.SupportsAstcCompression && _info.FormatInfo.Format.IsAstc())
{
if (!AstcDecoder.TryDecodeToRgba8(
data,
data.ToArray(),
_info.FormatInfo.BlockWidth,
_info.FormatInfo.BlockHeight,
_info.Width,