diff --git a/Ryujinx.Graphics.Texture/Astc/Buffer.cs b/Ryujinx.Common/Utilities/Buffers.cs similarity index 99% rename from Ryujinx.Graphics.Texture/Astc/Buffer.cs rename to Ryujinx.Common/Utilities/Buffers.cs index 96cf620eed..186cb4c76f 100644 --- a/Ryujinx.Graphics.Texture/Astc/Buffer.cs +++ b/Ryujinx.Common/Utilities/Buffers.cs @@ -3,7 +3,7 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -namespace LibHac.Common +namespace Ryujinx.Common.Utilities { [DebuggerDisplay("{ToString()}")] [StructLayout(LayoutKind.Sequential, Size = 16)] diff --git a/Ryujinx.Graphics.Texture/Astc/SpanHelpers.cs b/Ryujinx.Common/Utilities/SpanHelpers.cs similarity index 98% rename from Ryujinx.Graphics.Texture/Astc/SpanHelpers.cs rename to Ryujinx.Common/Utilities/SpanHelpers.cs index f63835d4e2..84c130233f 100644 --- a/Ryujinx.Graphics.Texture/Astc/SpanHelpers.cs +++ b/Ryujinx.Common/Utilities/SpanHelpers.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -namespace LibHac.Common +namespace Ryujinx.Common.Utilities { public static class SpanHelpers { diff --git a/Ryujinx.Graphics.Gpu/Image/Texture.cs b/Ryujinx.Graphics.Gpu/Image/Texture.cs index 1f8d3b00ef..0ea5245620 100644 --- a/Ryujinx.Graphics.Gpu/Image/Texture.cs +++ b/Ryujinx.Graphics.Gpu/Image/Texture.cs @@ -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 { @@ -245,7 +246,10 @@ namespace Ryujinx.Graphics.Gpu.Image if (!_context.Capabilities.SupportsAstcCompression && _info.FormatInfo.Format.IsAstc()) { - if (!AstcDecoder.TryDecodeToRgba8P( + Logger.PrintInfo(LogClass.Gpu, "Decoding ASTC texture"); + var watch = Stopwatch.StartNew(); + + if (!AstcDecoder.TryDecodeToRgba8( data.ToArray(), _info.FormatInfo.BlockWidth, _info.FormatInfo.BlockHeight, @@ -258,6 +262,10 @@ namespace Ryujinx.Graphics.Gpu.Image // TODO: Error. } + watch.Stop(); + + Logger.PrintInfo(LogClass.Gpu, $"Decoded texture in {watch.Elapsed.TotalSeconds} seconds"); + data = decoded; } diff --git a/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs b/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs index 625d7f9591..8465732736 100644 --- a/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs +++ b/Ryujinx.Graphics.Texture/Astc/AstcDecoder.cs @@ -1,4 +1,4 @@ -using LibHac.Common; +using Ryujinx.Common.Utilities; using System; using System.Diagnostics; using System.Linq; diff --git a/Ryujinx.Graphics.Texture/Astc/BitStream.cs b/Ryujinx.Graphics.Texture/Astc/BitStream.cs index 1f06879a72..a949cbe634 100644 --- a/Ryujinx.Graphics.Texture/Astc/BitStream.cs +++ b/Ryujinx.Graphics.Texture/Astc/BitStream.cs @@ -1,4 +1,4 @@ -using LibHac.Common; +using Ryujinx.Common.Utilities; using System; using System.Diagnostics; diff --git a/Ryujinx.Graphics.Texture/Astc/IntegerEncoded.cs b/Ryujinx.Graphics.Texture/Astc/IntegerEncoded.cs index 0a0b42edf0..26aee6acd7 100644 --- a/Ryujinx.Graphics.Texture/Astc/IntegerEncoded.cs +++ b/Ryujinx.Graphics.Texture/Astc/IntegerEncoded.cs @@ -1,4 +1,4 @@ -using LibHac.Common; +using Ryujinx.Common.Utilities; using System; using System.Diagnostics; using System.Numerics;