Path: blob/main_old/src/tests/gl_tests/CompressedTextureFormatsTest.cpp
1693 views
//1// Copyright 2021 The ANGLE Project Authors. All rights reserved.2// Use of this source code is governed by a BSD-style license that can be3// found in the LICENSE file.4//5// CompressedTextureFormatsTest:6// Tests that only the appropriate entry points are affected after7// enabling compressed texture extensions.8//910#include "libANGLE/capture/gl_enum_utils.h"11#include "test_utils/ANGLETest.h"12#include "test_utils/gl_raii.h"1314using namespace angle;1516namespace17{1819using FormatDesc = std::pair<GLenum, GLsizei>;20using CompressedTextureTestParams = std::tuple<angle::PlatformParameters, FormatDesc>;2122class CompressedTextureFormatsTest : public ANGLETestWithParam<CompressedTextureTestParams>23{24public:25CompressedTextureFormatsTest(const std::string ext1,26const std::string ext2,27const bool supportsUpdates,28const bool supports2DArray,29const bool supports3D,30const bool alwaysOnES3)31: mExtNames({ext1, ext2}),32mSupportsUpdates(supportsUpdates),33mSupports2DArray(supports2DArray),34mSupports3D(supports3D),35mAlwaysOnES3(alwaysOnES3)36{37setExtensionsEnabled(false);38}3940void testSetUp() override41{42// Older Metal versions do not support compressed TEXTURE_3D.43mDisableTexture3D = IsMetal() && !IsMetalCompressedTexture3DAvailable();44}4546void checkSubImage2D(GLenum format, GLsizei size)47{48GLubyte data[32];4950// The semantic of this call is to take uncompressed data, compress it on-the-fly,51// and perform a partial update of an existing GPU-compressed texture. This52// operation is not supported in OpenGL ES.53glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 4, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);54EXPECT_GL_ERROR(GL_INVALID_OPERATION);5556// Compressed texture extensions never extend TexSubImage2D.57glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 4, format, GL_UNSIGNED_BYTE, nullptr);58EXPECT_GL_ERROR(GL_INVALID_ENUM);5960// The semantic of this call is to take pixel data from the current framebuffer, compress it61// on-the-fly, and perform a partial update of an existing GPU-compressed texture. This62// operation is not supported in OpenGL ES.63glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 4, 4);64EXPECT_GL_ERROR(GL_INVALID_OPERATION);6566glCompressedTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 4, format, size, data);67EXPECT_GL_ERROR(mSupportsUpdates ? GL_NO_ERROR : GL_INVALID_OPERATION);68}6970void checkSubImage3D(GLenum target, GLenum format, GLsizei size)71{72GLubyte data[32];7374// The semantic of this call is to take uncompressed data, compress it on-the-fly,75// and perform a partial update of an existing GPU-compressed texture. This76// operation is not supported in OpenGL ES.77glTexSubImage3D(target, 0, 0, 0, 0, 4, 4, 1, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);78EXPECT_GL_ERROR(GL_INVALID_OPERATION);7980// Compressed texture extensions never extend TexSubImage3D.81glTexSubImage3D(target, 0, 0, 0, 0, 4, 4, 1, format, GL_UNSIGNED_BYTE, nullptr);82EXPECT_GL_ERROR(GL_INVALID_ENUM);8384// The semantic of this call is to take pixel data from the current framebuffer, compress it85// on-the-fly, and perform a partial update of an existing GPU-compressed texture. This86// operation is not supported in OpenGL ES.87glCopyTexSubImage3D(target, 0, 0, 0, 0, 0, 0, 4, 4);88EXPECT_GL_ERROR(GL_INVALID_OPERATION);8990glCompressedTexSubImage3D(target, 0, 0, 0, 0, 4, 4, 1, format, size, data);91EXPECT_GL_NO_ERROR();92}9394void check2D(const bool compressedFormatEnabled)95{96const GLenum format = ::testing::get<1>(GetParam()).first;97const GLsizei size = ::testing::get<1>(GetParam()).second;9899{100GLTexture texture;101glBindTexture(GL_TEXTURE_2D, texture);102103// The semantic of this call is to take uncompressed data and compress it on-the-fly.104// This operation is not supported in OpenGL ES.105glTexImage2D(GL_TEXTURE_2D, 0, format, 4, 4, 0, GL_RGB, GL_UNSIGNED_BYTE, nullptr);106EXPECT_GL_ERROR(getClientMajorVersion() >= 3 ? GL_INVALID_OPERATION : GL_INVALID_VALUE);107108// Try compressed enum as format. Compressed texture extensions never allow this.109glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 4, 4, 0, format, GL_UNSIGNED_BYTE, nullptr);110EXPECT_GL_ERROR(GL_INVALID_ENUM);111112// The semantic of this call is to take pixel data from the current framebuffer113// and create a compressed texture from it on-the-fly. This operation is not supported114// in OpenGL ES.115glCopyTexImage2D(GL_TEXTURE_2D, 0, format, 0, 0, 4, 4, 0);116EXPECT_GL_ERROR(GL_INVALID_OPERATION);117118glCompressedTexImage2D(GL_TEXTURE_2D, 0, format, 4, 4, 0, size, nullptr);119if (compressedFormatEnabled)120{121EXPECT_GL_NO_ERROR();122123checkSubImage2D(format, size);124}125else126{127EXPECT_GL_ERROR(GL_INVALID_ENUM);128}129}130131if (getClientMajorVersion() >= 3)132{133GLTexture texture;134glBindTexture(GL_TEXTURE_2D, texture);135136glTexStorage2D(GL_TEXTURE_2D, 1, format, 4, 4);137if (compressedFormatEnabled)138{139EXPECT_GL_NO_ERROR();140141checkSubImage2D(format, size);142}143else144{145EXPECT_GL_ERROR(GL_INVALID_ENUM);146}147}148149if (EnsureGLExtensionEnabled("GL_EXT_texture_storage"))150{151GLTexture texture;152glBindTexture(GL_TEXTURE_2D, texture);153154glTexStorage2DEXT(GL_TEXTURE_2D, 1, format, 4, 4);155if (compressedFormatEnabled)156{157EXPECT_GL_NO_ERROR();158159checkSubImage2D(format, size);160}161else162{163EXPECT_GL_ERROR(GL_INVALID_ENUM);164}165}166}167168void check3D(GLenum target, const bool compressedFormatEnabled, const bool supportsTarget)169{170const GLenum format = ::testing::get<1>(GetParam()).first;171const GLsizei size = ::testing::get<1>(GetParam()).second;172173{174GLTexture texture;175glBindTexture(target, texture);176177// Try compressed enum as internalformat. The semantic of this call is to take178// uncompressed data and compress it on-the-fly. This operation is not supported in179// OpenGL ES.180glTexImage3D(target, 0, format, 4, 4, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, nullptr);181EXPECT_GL_ERROR(GL_INVALID_OPERATION);182183// Try compressed enum as format. Compressed texture extensions never allow this.184glTexImage3D(target, 0, GL_RGB, 4, 4, 1, 0, format, GL_UNSIGNED_BYTE, nullptr);185EXPECT_GL_ERROR(GL_INVALID_ENUM);186187glCompressedTexImage3D(target, 0, format, 4, 4, 1, 0, size, nullptr);188if (compressedFormatEnabled)189{190if (supportsTarget)191{192EXPECT_GL_NO_ERROR();193194checkSubImage3D(target, format, size);195}196else197{198EXPECT_GL_ERROR(GL_INVALID_OPERATION);199}200}201else202{203EXPECT_GL_ERROR(GL_INVALID_ENUM);204}205}206207{208GLTexture texture;209glBindTexture(target, texture);210211glTexStorage3D(target, 1, format, 4, 4, 1);212if (compressedFormatEnabled)213{214if (supportsTarget)215{216EXPECT_GL_NO_ERROR();217218checkSubImage3D(target, format, size);219}220else221{222EXPECT_GL_ERROR(GL_INVALID_OPERATION);223}224}225else226{227EXPECT_GL_ERROR(GL_INVALID_ENUM);228}229}230}231232void test()233{234// ETC2/EAC formats always pass validation on ES3 contexts but in some cases fail in drivers235// because their emulation is not implemented for OpenGL renderer.236// https://crbug.com/angleproject/6300237if (mAlwaysOnES3)238{239ANGLE_SKIP_TEST_IF(getClientMajorVersion() >= 3 &&240!IsGLExtensionRequestable(mExtNames[0]));241}242243// It's not possible to disable ETC2/EAC support on ES 3.0.244const bool compressedFormatEnabled = mAlwaysOnES3 && getClientMajorVersion() >= 3;245check2D(compressedFormatEnabled);246if (getClientMajorVersion() >= 3)247{248check3D(GL_TEXTURE_2D_ARRAY, compressedFormatEnabled, mSupports2DArray);249check3D(GL_TEXTURE_3D, compressedFormatEnabled, mSupports3D && !mDisableTexture3D);250}251252for (const std::string &extName : mExtNames)253{254if (!extName.empty())255{256if (IsGLExtensionRequestable(extName))257{258glRequestExtensionANGLE(extName.c_str());259}260ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled(extName));261}262}263264// Repeat all checks after enabling the extensions.265check2D(true);266if (getClientMajorVersion() >= 3)267{268check3D(GL_TEXTURE_2D_ARRAY, true, mSupports2DArray);269check3D(GL_TEXTURE_3D, true, mSupports3D && !mDisableTexture3D);270}271}272273private:274bool mDisableTexture3D = false;275const std::vector<std::string> mExtNames;276const bool mSupportsUpdates;277const bool mSupports2DArray;278const bool mSupports3D;279const bool mAlwaysOnES3;280};281282template <char const *ext1,283char const *ext2,284bool supports_updates,285bool supports_2d_array,286bool supports_3d,287bool always_on_es3>288class _Test : public CompressedTextureFormatsTest289{290public:291_Test()292: CompressedTextureFormatsTest(ext1,293ext2,294supports_updates,295supports_2d_array,296supports_3d,297always_on_es3)298{}299};300301const char kDXT1[] = "GL_EXT_texture_compression_dxt1";302const char kDXT3[] = "GL_ANGLE_texture_compression_dxt3";303const char kDXT5[] = "GL_ANGLE_texture_compression_dxt5";304const char kS3TCSRGB[] = "GL_EXT_texture_compression_s3tc_srgb";305const char kRGTC[] = "GL_EXT_texture_compression_rgtc";306const char kBPTC[] = "GL_EXT_texture_compression_bptc";307308const char kETC1[] = "GL_OES_compressed_ETC1_RGB8_texture";309const char kETC1Sub[] = "GL_EXT_compressed_ETC1_RGB8_sub_texture";310311const char kEACR11U[] = "GL_OES_compressed_EAC_R11_unsigned_texture";312const char kEACR11S[] = "GL_OES_compressed_EAC_R11_signed_texture";313const char kEACRG11U[] = "GL_OES_compressed_EAC_RG11_unsigned_texture";314const char kEACRG11S[] = "GL_OES_compressed_EAC_RG11_signed_texture";315316const char kETC2RGB8[] = "GL_OES_compressed_ETC2_RGB8_texture";317const char kETC2RGB8SRGB[] = "GL_OES_compressed_ETC2_sRGB8_texture";318const char kETC2RGB8A1[] = "GL_OES_compressed_ETC2_punchthroughA_RGBA8_texture";319const char kETC2RGB8A1SRGB[] = "GL_OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture";320const char kETC2RGBA8[] = "GL_OES_compressed_ETC2_RGBA8_texture";321const char kETC2RGBA8SRGB[] = "GL_OES_compressed_ETC2_sRGB8_alpha8_texture";322323const char kASTC[] = "GL_KHR_texture_compression_astc_ldr";324const char kASTCSliced3D[] = "GL_KHR_texture_compression_astc_sliced_3d";325326const char kPVRTC1[] = "GL_IMG_texture_compression_pvrtc";327const char kPVRTCSRGB[] = "GL_EXT_pvrtc_sRGB";328329const char kEmpty[] = "";330331// clang-format off332using CompressedTextureDXT1Test = _Test<kDXT1, kEmpty, true, true, false, false>;333using CompressedTextureDXT3Test = _Test<kDXT3, kEmpty, true, true, false, false>;334using CompressedTextureDXT5Test = _Test<kDXT5, kEmpty, true, true, false, false>;335using CompressedTextureS3TCSRGBTest = _Test<kS3TCSRGB, kEmpty, true, true, false, false>;336using CompressedTextureRGTCTest = _Test<kRGTC, kEmpty, true, true, false, false>;337using CompressedTextureBPTCTest = _Test<kBPTC, kEmpty, true, true, true, false>;338339using CompressedTextureETC1Test = _Test<kETC1, kEmpty, false, false, false, false>;340using CompressedTextureETC1SubTest = _Test<kETC1, kETC1Sub, true, false, false, false>;341342using CompressedTextureEACR11UTest = _Test<kEACR11U, kEmpty, true, true, false, true>;343using CompressedTextureEACR11STest = _Test<kEACR11S, kEmpty, true, true, false, true>;344using CompressedTextureEACRG11UTest = _Test<kEACRG11U, kEmpty, true, true, false, true>;345using CompressedTextureEACRG11STest = _Test<kEACRG11S, kEmpty, true, true, false, true>;346347using CompressedTextureETC2RGB8Test = _Test<kETC2RGB8, kEmpty, true, true, false, true>;348using CompressedTextureETC2RGB8SRGBTest = _Test<kETC2RGB8SRGB, kEmpty, true, true, false, true>;349using CompressedTextureETC2RGB8A1Test = _Test<kETC2RGB8A1, kEmpty, true, true, false, true>;350using CompressedTextureETC2RGB8A1SRGBTest = _Test<kETC2RGB8A1SRGB, kEmpty, true, true, false, true>;351using CompressedTextureETC2RGBA8Test = _Test<kETC2RGBA8, kEmpty, true, true, false, true>;352using CompressedTextureETC2RGBA8SRGBTest = _Test<kETC2RGBA8SRGB, kEmpty, true, true, false, true>;353354using CompressedTextureASTCTest = _Test<kASTC, kEmpty, true, true, false, false>;355using CompressedTextureASTCSliced3DTest = _Test<kASTC, kASTCSliced3D, true, true, true, false>;356357using CompressedTexturePVRTC1Test = _Test<kPVRTC1, kEmpty, true, false, false, false>;358using CompressedTexturePVRTC1SRGBTest = _Test<kPVRTC1, kPVRTCSRGB, true, false, false, false>;359// clang-format on360361std::string PrintToStringParamName(362const ::testing::TestParamInfo<CompressedTextureTestParams> &info)363{364std::string name = gl::GLinternalFormatToString(std::get<1>(info.param).first);365name.erase(0, 3); // Remove GL_366if (name.find("COMPRESSED_") == 0)367{368name.erase(0, 11);369}370for (std::string str : {"_EXT", "_IMG", "_KHR", "_OES"})371{372if (name.find(str) != std::string::npos)373{374name.erase(name.length() - 4, 4);375break;376}377}378std::stringstream nameStr;379nameStr << name << "__" << std::get<0>(info.param);380return nameStr.str();381}382383static const FormatDesc kDXT1Formats[] = {{GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 8},384{GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, 8}};385386static const FormatDesc kDXT3Formats[] = {{GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, 16}};387388static const FormatDesc kDXT5Formats[] = {{GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, 16}};389390static const FormatDesc kS3TCSRGBFormats[] = {{GL_COMPRESSED_SRGB_S3TC_DXT1_EXT, 8},391{GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, 8},392{GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, 16},393{GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, 16}};394395static const FormatDesc kRGTCFormats[] = {{GL_COMPRESSED_RED_RGTC1_EXT, 8},396{GL_COMPRESSED_SIGNED_RED_RGTC1_EXT, 8},397{GL_COMPRESSED_RED_GREEN_RGTC2_EXT, 16},398{GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT, 16}};399400static const FormatDesc kBPTCFormats[] = {{GL_COMPRESSED_RGBA_BPTC_UNORM_EXT, 16},401{GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT, 16},402{GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, 16},403{GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT, 16}};404405static const FormatDesc kETC1Formats[] = {{GL_ETC1_RGB8_OES, 8}};406407// clang-format off408static const FormatDesc kEACR11UFormats[] = {{GL_COMPRESSED_R11_EAC, 8}};409static const FormatDesc kEACR11SFormats[] = {{GL_COMPRESSED_SIGNED_R11_EAC, 8}};410static const FormatDesc kEACRG11UFormats[] = {{GL_COMPRESSED_RG11_EAC, 16}};411static const FormatDesc kEACRG11SFormats[] = {{GL_COMPRESSED_SIGNED_RG11_EAC, 16}};412static const FormatDesc kETC2RGB8Formats[] = {{GL_COMPRESSED_RGB8_ETC2, 8}};413static const FormatDesc kETC2RGB8SRGBFormats[] = {{GL_COMPRESSED_SRGB8_ETC2, 8}};414static const FormatDesc kETC2RGB8A1Formats[] = {{GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, 8}};415static const FormatDesc kETC2RGB8A1SRGBFormats[] = {{GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, 8}};416static const FormatDesc kETC2RGBA8Formats[] = {{GL_COMPRESSED_RGBA8_ETC2_EAC, 16}};417static const FormatDesc kETC2RGBA8SRGBFormats[] = {{GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, 16}};418// clang-format on419420static const FormatDesc kASTCFormats[] = {{GL_COMPRESSED_RGBA_ASTC_4x4_KHR, 16},421{GL_COMPRESSED_RGBA_ASTC_5x4_KHR, 16},422{GL_COMPRESSED_RGBA_ASTC_5x5_KHR, 16},423{GL_COMPRESSED_RGBA_ASTC_6x5_KHR, 16},424{GL_COMPRESSED_RGBA_ASTC_6x6_KHR, 16},425{GL_COMPRESSED_RGBA_ASTC_8x5_KHR, 16},426{GL_COMPRESSED_RGBA_ASTC_8x6_KHR, 16},427{GL_COMPRESSED_RGBA_ASTC_8x8_KHR, 16},428{GL_COMPRESSED_RGBA_ASTC_10x5_KHR, 16},429{GL_COMPRESSED_RGBA_ASTC_10x6_KHR, 16},430{GL_COMPRESSED_RGBA_ASTC_10x8_KHR, 16},431{GL_COMPRESSED_RGBA_ASTC_10x10_KHR, 16},432{GL_COMPRESSED_RGBA_ASTC_12x10_KHR, 16},433{GL_COMPRESSED_RGBA_ASTC_12x12_KHR, 16},434{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, 16},435{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, 16},436{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, 16},437{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, 16},438{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, 16},439{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, 16},440{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, 16},441{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, 16},442{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, 16},443{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, 16},444{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, 16},445{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, 16},446{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, 16},447{GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, 16}};448449static const FormatDesc kPVRTC1Formats[] = {{GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG, 32},450{GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG, 32},451{GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, 32},452{GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG, 32}};453454static const FormatDesc kPVRTC1SRGBFormats[] = {{GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT, 32},455{GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT, 32},456{GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT, 32},457{GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT, 32}};458459ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureDXT1Test,460PrintToStringParamName,461testing::ValuesIn(kDXT1Formats),462ANGLE_ALL_TEST_PLATFORMS_ES2,463ANGLE_ALL_TEST_PLATFORMS_ES3);464465ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureDXT3Test,466PrintToStringParamName,467testing::ValuesIn(kDXT3Formats),468ANGLE_ALL_TEST_PLATFORMS_ES2,469ANGLE_ALL_TEST_PLATFORMS_ES3);470471ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureDXT5Test,472PrintToStringParamName,473testing::ValuesIn(kDXT5Formats),474ANGLE_ALL_TEST_PLATFORMS_ES2,475ANGLE_ALL_TEST_PLATFORMS_ES3);476477ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureS3TCSRGBTest,478PrintToStringParamName,479testing::ValuesIn(kS3TCSRGBFormats),480ANGLE_ALL_TEST_PLATFORMS_ES2,481ANGLE_ALL_TEST_PLATFORMS_ES3);482483ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureRGTCTest,484PrintToStringParamName,485testing::ValuesIn(kRGTCFormats),486ANGLE_ALL_TEST_PLATFORMS_ES2,487ANGLE_ALL_TEST_PLATFORMS_ES3);488489ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureBPTCTest,490PrintToStringParamName,491testing::ValuesIn(kBPTCFormats),492ANGLE_ALL_TEST_PLATFORMS_ES2,493ANGLE_ALL_TEST_PLATFORMS_ES3);494495ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureETC1Test,496PrintToStringParamName,497testing::ValuesIn(kETC1Formats),498ANGLE_ALL_TEST_PLATFORMS_ES2,499ANGLE_ALL_TEST_PLATFORMS_ES3);500501ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureETC1SubTest,502PrintToStringParamName,503testing::ValuesIn(kETC1Formats),504ANGLE_ALL_TEST_PLATFORMS_ES2,505ANGLE_ALL_TEST_PLATFORMS_ES3);506507ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureEACR11UTest,508PrintToStringParamName,509testing::ValuesIn(kEACR11UFormats),510ANGLE_ALL_TEST_PLATFORMS_ES2,511ANGLE_ALL_TEST_PLATFORMS_ES3);512513ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureEACR11STest,514PrintToStringParamName,515testing::ValuesIn(kEACR11SFormats),516ANGLE_ALL_TEST_PLATFORMS_ES2,517ANGLE_ALL_TEST_PLATFORMS_ES3);518519ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureEACRG11UTest,520PrintToStringParamName,521testing::ValuesIn(kEACRG11UFormats),522ANGLE_ALL_TEST_PLATFORMS_ES2,523ANGLE_ALL_TEST_PLATFORMS_ES3);524525ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureEACRG11STest,526PrintToStringParamName,527testing::ValuesIn(kEACRG11SFormats),528ANGLE_ALL_TEST_PLATFORMS_ES2,529ANGLE_ALL_TEST_PLATFORMS_ES3);530531ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureETC2RGB8Test,532PrintToStringParamName,533testing::ValuesIn(kETC2RGB8Formats),534ANGLE_ALL_TEST_PLATFORMS_ES2,535ANGLE_ALL_TEST_PLATFORMS_ES3);536537ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureETC2RGB8SRGBTest,538PrintToStringParamName,539testing::ValuesIn(kETC2RGB8SRGBFormats),540ANGLE_ALL_TEST_PLATFORMS_ES2,541ANGLE_ALL_TEST_PLATFORMS_ES3);542543ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureETC2RGB8A1Test,544PrintToStringParamName,545testing::ValuesIn(kETC2RGB8A1Formats),546ANGLE_ALL_TEST_PLATFORMS_ES2,547ANGLE_ALL_TEST_PLATFORMS_ES3);548549ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureETC2RGB8A1SRGBTest,550PrintToStringParamName,551testing::ValuesIn(kETC2RGB8A1SRGBFormats),552ANGLE_ALL_TEST_PLATFORMS_ES2,553ANGLE_ALL_TEST_PLATFORMS_ES3);554555ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureETC2RGBA8Test,556PrintToStringParamName,557testing::ValuesIn(kETC2RGBA8Formats),558ANGLE_ALL_TEST_PLATFORMS_ES2,559ANGLE_ALL_TEST_PLATFORMS_ES3);560561ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureETC2RGBA8SRGBTest,562PrintToStringParamName,563testing::ValuesIn(kETC2RGBA8SRGBFormats),564ANGLE_ALL_TEST_PLATFORMS_ES2,565ANGLE_ALL_TEST_PLATFORMS_ES3);566567ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureASTCTest,568PrintToStringParamName,569testing::ValuesIn(kASTCFormats),570ANGLE_ALL_TEST_PLATFORMS_ES2,571ANGLE_ALL_TEST_PLATFORMS_ES3);572573ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTextureASTCSliced3DTest,574PrintToStringParamName,575testing::ValuesIn(kASTCFormats),576ANGLE_ALL_TEST_PLATFORMS_ES2,577ANGLE_ALL_TEST_PLATFORMS_ES3);578579ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTexturePVRTC1Test,580PrintToStringParamName,581testing::ValuesIn(kPVRTC1Formats),582ANGLE_ALL_TEST_PLATFORMS_ES2,583ANGLE_ALL_TEST_PLATFORMS_ES3);584585ANGLE_INSTANTIATE_TEST_COMBINE_1(CompressedTexturePVRTC1SRGBTest,586PrintToStringParamName,587testing::ValuesIn(kPVRTC1SRGBFormats),588ANGLE_ALL_TEST_PLATFORMS_ES2,589ANGLE_ALL_TEST_PLATFORMS_ES3);590591// clang-format off592TEST_P(CompressedTextureDXT1Test, Test) { test(); }593TEST_P(CompressedTextureDXT3Test, Test) { test(); }594TEST_P(CompressedTextureDXT5Test, Test) { test(); }595TEST_P(CompressedTextureS3TCSRGBTest, Test) { test(); }596TEST_P(CompressedTextureRGTCTest, Test) { test(); }597TEST_P(CompressedTextureBPTCTest, Test) { test(); }598599TEST_P(CompressedTextureETC1Test, Test) { test(); }600TEST_P(CompressedTextureETC1SubTest, Test) { test(); }601602TEST_P(CompressedTextureEACR11UTest, Test) { test(); }603TEST_P(CompressedTextureEACR11STest, Test) { test(); }604TEST_P(CompressedTextureEACRG11UTest, Test) { test(); }605TEST_P(CompressedTextureEACRG11STest, Test) { test(); }606607TEST_P(CompressedTextureETC2RGB8Test, Test) { test(); }608TEST_P(CompressedTextureETC2RGB8SRGBTest, Test) { test(); }609TEST_P(CompressedTextureETC2RGB8A1Test, Test) { test(); }610TEST_P(CompressedTextureETC2RGB8A1SRGBTest, Test) { test(); }611TEST_P(CompressedTextureETC2RGBA8Test, Test) { test(); }612TEST_P(CompressedTextureETC2RGBA8SRGBTest, Test) { test(); }613614TEST_P(CompressedTextureASTCTest, Test) { test(); }615TEST_P(CompressedTextureASTCSliced3DTest, Test) { test(); }616617TEST_P(CompressedTexturePVRTC1Test, Test) { test(); }618TEST_P(CompressedTexturePVRTC1SRGBTest, Test) { test(); }619// clang-format on620} // namespace621622623