added notes so folks can help me review

This commit is contained in:
Michael Durrant 2023-06-12 16:14:38 -06:00
parent 601c924699
commit 8be123440d
1 changed files with 19 additions and 1 deletions

View File

@ -11,6 +11,24 @@ using System.Threading.Tasks;
namespace Ryujinx.Tests.Graphics
{
/**
*
* NOTES
*
* HOW I GENERATED INPUT DATA
* Step 1. Create ASTC-compressed image from sample data.
* *** NOTE This image isn't 2^x evenly sized, it's 768x512 - something that would break down into nice squares, for sure.
* `bin/astcenc-avx2 -cl sources/kodim01.png output/kodim01.l4x4.astc 4x4 -fast`
*
* Step 2. Decompress the data we just created.
* `bin/astcenc-avx2 -dl output/kodim01.l4x4.astc output/kodim01.l4x4.astc.png`
*
* WHAT WE DO IN THE TEST BELOW:
* 1. Read the sample iamge, ASTC-compressed reference, and decompressed reference that we generated above.
* 2. Run TryDecodeToRgba8P on our ASTC-compressed texture.
* 3. Assert that the data we decompressed in our method is the same data as the decompressed reference image.
*/
public class AstcDecoderTests
{
private string _workingDir;
@ -39,7 +57,7 @@ namespace Ryujinx.Tests.Graphics
int levels = 1;
int layers = 1;
_ = AstcDecoder.TryDecodeToRgba8P(original, blockWidth, blockHeight, texWidth, texHeight, depth, levels, layers, out outputBuffer);
_ = AstcDecoder.TryDecodeToRgba8P(encodedRef, blockWidth, blockHeight, texWidth, texHeight, depth, levels, layers, out outputBuffer);
var outputPath = Path.Join(_testDataDir, "kodim01.l4x4.output.png");
// Make sure we're clobbering the test output.