diff --git a/resources/dxt_images/64x256_bands.png b/resources/dxt_images/64x256_bands.png new file mode 100644 index 0000000..b0ce025 Binary files /dev/null and b/resources/dxt_images/64x256_bands.png differ diff --git a/resources/dxt_images/64x256_bands_dxt1.dds b/resources/dxt_images/64x256_bands_dxt1.dds new file mode 100644 index 0000000..9be1b5f Binary files /dev/null and b/resources/dxt_images/64x256_bands_dxt1.dds differ diff --git a/resources/dxt_images/64x256_bands_dxt3.dds b/resources/dxt_images/64x256_bands_dxt3.dds new file mode 100644 index 0000000..fc24c05 Binary files /dev/null and b/resources/dxt_images/64x256_bands_dxt3.dds differ diff --git a/resources/dxt_images/64x256_bands_dxt5.dds b/resources/dxt_images/64x256_bands_dxt5.dds new file mode 100644 index 0000000..64c1319 Binary files /dev/null and b/resources/dxt_images/64x256_bands_dxt5.dds differ diff --git a/src/tests/texture_format_dxt_tests.cpp b/src/tests/texture_format_dxt_tests.cpp index 3a7b95f..fc7afd0 100644 --- a/src/tests/texture_format_dxt_tests.cpp +++ b/src/tests/texture_format_dxt_tests.cpp @@ -18,6 +18,10 @@ static constexpr const char kOpaqueDXT1[] = "D:\\dxt_images\\plasma_dxt1.dds"; static constexpr const char kOpaqueDXT3[] = "D:\\dxt_images\\plasma_dxt3.dds"; static constexpr const char kOpaqueDXT5[] = "D:\\dxt_images\\plasma_dxt5.dds"; +static constexpr const char kOpaqueDXT1NonSquare[] = "D:\\dxt_images\\64x256_bands_dxt1.dds"; +static constexpr const char kOpaqueDXT3NonSquare[] = "D:\\dxt_images\\64x256_bands_dxt3.dds"; +static constexpr const char kOpaqueDXT5NonSquare[] = "D:\\dxt_images\\64x256_bands_dxt5.dds"; + struct TestCase { const char *filename; TextureFormatDXTTests::CompressedTextureFormat format; @@ -32,6 +36,12 @@ static constexpr TestCase kTestCases[] = { {kOpaqueDXT5, TextureFormatDXTTests::CompressedTextureFormat::DXT5}, }; +static constexpr TestCase kNonSquareTestCases[] = { + {kOpaqueDXT1NonSquare, TextureFormatDXTTests::CompressedTextureFormat::DXT1}, + {kOpaqueDXT3NonSquare, TextureFormatDXTTests::CompressedTextureFormat::DXT3}, + {kOpaqueDXT5NonSquare, TextureFormatDXTTests::CompressedTextureFormat::DXT5}, +}; + static std::string GetFormatName(TextureFormatDXTTests::CompressedTextureFormat texture_format); TextureFormatDXTTests::TextureFormatDXTTests(TestHost &host, std::string output_dir) @@ -42,6 +52,12 @@ TextureFormatDXTTests::TextureFormatDXTTests(TestHost &host, std::string output_ TestMipmap(test.filename, test.format); }; } + + for (auto &test : kNonSquareTestCases) { + tests_[MakeTestName(test.filename, test.format, true)] = [this, &test]() { + TestMipmap(test.filename, test.format); + }; + } } void TextureFormatDXTTests::Initialize() {