Adds non-square dxt texture tests.

This commit is contained in:
Erik Abair 2022-07-01 10:28:37 -07:00
parent b5b9f5a065
commit aa9a6e958f
5 changed files with 16 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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() {