mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-28 04:24:15 +01:00
Add 2BPP tests
This commit is contained in:
parent
0172df4e60
commit
08cad3ba86
@ -76,7 +76,8 @@ IF(PVRTEXLIB_FOUND)
|
|||||||
|
|
||||||
# Copy the .pvr files that we will use for testing...
|
# Copy the .pvr files that we will use for testing...
|
||||||
SET(TEST_IMAGES
|
SET(TEST_IMAGES
|
||||||
gradient white gray transparent trans-gradient
|
4bpp-gradient 4bpp-white 4bpp-gray 4bpp-transparent 4bpp-trans-gradient
|
||||||
|
2bpp-gradient 2bpp-white 2bpp-gray 2bpp-transparent 2bpp-trans-gradient
|
||||||
)
|
)
|
||||||
FOREACH(IMAGE ${TEST_IMAGES})
|
FOREACH(IMAGE ${TEST_IMAGES})
|
||||||
FILE(COPY
|
FILE(COPY
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
class ImageTester {
|
class ImageTester {
|
||||||
public:
|
public:
|
||||||
explicit ImageTester(const char *filename) {
|
explicit ImageTester(const char *filename, bool twobpp) {
|
||||||
pvrtexture::CPVRTexture pvrTex(filename);
|
pvrtexture::CPVRTexture pvrTex(filename);
|
||||||
|
|
||||||
const uint8 *data = static_cast<const uint8 *>(pvrTex.getDataPtr());
|
const uint8 *data = static_cast<const uint8 *>(pvrTex.getDataPtr());
|
||||||
@ -107,23 +107,42 @@ class ImageTester {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST(Decompressor, DecompressGradient) {
|
TEST(Decompressor, DecompressWhite2BPP) {
|
||||||
ImageTester("gradient.pvr");
|
ImageTester("2bpp-white.pvr", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Decompressor, DecompressWhite) {
|
TEST(Decompressor, DecompressGray2BPP) {
|
||||||
ImageTester("white.pvr");
|
ImageTester("2bpp-gray.pvr", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Decompressor, DecompressGray) {
|
TEST(Decompressor, DecompressGradient2BPP) {
|
||||||
ImageTester("gray.pvr");
|
ImageTester("2bpp-gradient.pvr", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Decompressor, DecompressTransparent) {
|
TEST(Decompressor, DecompressTransparent2BPP) {
|
||||||
ImageTester("transparent.pvr");
|
ImageTester("2bpp-transparent.pvr", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(Decompressor, DecompressTransGradient) {
|
TEST(Decompressor, DecompressTransGradient2BPP) {
|
||||||
ImageTester("trans-gradient.pvr");
|
ImageTester("2bpp-trans-gradient.pvr", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(Decompressor, DecompressWhite4BPP) {
|
||||||
|
ImageTester("4bpp-white.pvr", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(Decompressor, DecompressGray4BPP) {
|
||||||
|
ImageTester("4bpp-gray.pvr", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(Decompressor, DecompressGradient4BPP) {
|
||||||
|
ImageTester("4bpp-gradient.pvr", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(Decompressor, DecompressTransparent4BPP) {
|
||||||
|
ImageTester("4bpp-transparent.pvr", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(Decompressor, DecompressTransGradient4BPP) {
|
||||||
|
ImageTester("4bpp-trans-gradient.pvr", false);
|
||||||
|
}
|
||||||
|
BIN
PVRTCEncoder/test/data/2bpp-gradient.pvr
Normal file
BIN
PVRTCEncoder/test/data/2bpp-gradient.pvr
Normal file
Binary file not shown.
BIN
PVRTCEncoder/test/data/2bpp-gray.pvr
Normal file
BIN
PVRTCEncoder/test/data/2bpp-gray.pvr
Normal file
Binary file not shown.
BIN
PVRTCEncoder/test/data/2bpp-trans-gradient.pvr
Normal file
BIN
PVRTCEncoder/test/data/2bpp-trans-gradient.pvr
Normal file
Binary file not shown.
BIN
PVRTCEncoder/test/data/2bpp-transparent.pvr
Normal file
BIN
PVRTCEncoder/test/data/2bpp-transparent.pvr
Normal file
Binary file not shown.
BIN
PVRTCEncoder/test/data/2bpp-white.pvr
Normal file
BIN
PVRTCEncoder/test/data/2bpp-white.pvr
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user