chromium/third_party/angle/src/tests/gl_tests/CompressedTextureFormatsTest.cpp

//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CompressedTextureFormatsTest:
//   Tests that only the appropriate entry points are affected after
//   enabling compressed texture extensions.
//

#include "common/gl_enum_utils.h"
#include "test_utils/ANGLETest.h"
#include "test_utils/gl_raii.h"

usingnamespaceangle;

namespace
{

struct FormatDesc
{};
CompressedTextureTestParams;

class CompressedTextureFormatsTest : public ANGLETest<CompressedTextureTestParams>
{};

template <char const *ext1,
          char const *ext2,
          bool supports_updates,
          bool supports_partial_updates,
          bool supports_2d_array,
          bool supports_3d,
          bool always_on_es3>
class _Test : public CompressedTextureFormatsTest
{};

const char kDXT1[]     =;
const char kDXT3[]     =;
const char kDXT5[]     =;
const char kS3TCSRGB[] =;
const char kRGTC[]     =;
const char kBPTC[]     =;

const char kETC1[]    =;
const char kETC1Sub[] =;

const char kEACR11U[]  =;
const char kEACR11S[]  =;
const char kEACRG11U[] =;
const char kEACRG11S[] =;

const char kETC2RGB8[]       =;
const char kETC2RGB8SRGB[]   =;
const char kETC2RGB8A1[]     =;
const char kETC2RGB8A1SRGB[] =;
const char kETC2RGBA8[]      =;
const char kETC2RGBA8SRGB[]  =;

const char kASTC[]         =;
const char kASTCSliced3D[] =;

const char kPVRTC1[]    =;
const char kPVRTCSRGB[] =;

const char kEmpty[] =;

// clang-format off
CompressedTextureDXT1Test;
CompressedTextureDXT3Test;
CompressedTextureDXT5Test;
CompressedTextureS3TCSRGBTest;
CompressedTextureRGTCTest;
CompressedTextureBPTCTest;

CompressedTextureETC1Test;
CompressedTextureETC1SubTest;

CompressedTextureEACR11UTest;
CompressedTextureEACR11STest;
CompressedTextureEACRG11UTest;
CompressedTextureEACRG11STest;

CompressedTextureETC2RGB8Test;
CompressedTextureETC2RGB8SRGBTest;
CompressedTextureETC2RGB8A1Test;
CompressedTextureETC2RGB8A1SRGBTest;
CompressedTextureETC2RGBA8Test;
CompressedTextureETC2RGBA8SRGBTest;

CompressedTextureASTCTest;
CompressedTextureASTCSliced3DTest;

CompressedTexturePVRTC1Test;
CompressedTexturePVRTC1SRGBTest;
// clang-format on

std::string PrintToStringParamName(
    const ::testing::TestParamInfo<CompressedTextureTestParams> &info)
{}

static const FormatDesc kDXT1Formats[] =;

static const FormatDesc kDXT3Formats[] =;

static const FormatDesc kDXT5Formats[] =;

static const FormatDesc kS3TCSRGBFormats[] =;

static const FormatDesc kRGTCFormats[] =;

static const FormatDesc kBPTCFormats[] =;

static const FormatDesc kETC1Formats[] =;

// clang-format off
static const FormatDesc kEACR11UFormats[]        =;
static const FormatDesc kEACR11SFormats[]        =;
static const FormatDesc kEACRG11UFormats[]       =;
static const FormatDesc kEACRG11SFormats[]       =;
static const FormatDesc kETC2RGB8Formats[]       =;
static const FormatDesc kETC2RGB8SRGBFormats[]   =;
static const FormatDesc kETC2RGB8A1Formats[]     =;
static const FormatDesc kETC2RGB8A1SRGBFormats[] =;
static const FormatDesc kETC2RGBA8Formats[]      =;
static const FormatDesc kETC2RGBA8SRGBFormats[]  =;
// clang-format on

static const FormatDesc kASTCFormats[] =;

static const FormatDesc kPVRTC1Formats[] =;

static const FormatDesc kPVRTC1SRGBFormats[] =;

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

ANGLE_INSTANTIATE_TEST_COMBINE_1();

// clang-format off
TEST_P(CompressedTextureDXT1Test,     Test) {}
TEST_P(CompressedTextureDXT3Test,     Test) {}
TEST_P(CompressedTextureDXT5Test,     Test) {}
TEST_P(CompressedTextureS3TCSRGBTest, Test) {}
TEST_P(CompressedTextureRGTCTest,     Test) {}
TEST_P(CompressedTextureBPTCTest,     Test) {}

TEST_P(CompressedTextureETC1Test,    Test) {}
TEST_P(CompressedTextureETC1SubTest, Test) {}

TEST_P(CompressedTextureEACR11UTest,  Test) {}
TEST_P(CompressedTextureEACR11STest,  Test) {}
TEST_P(CompressedTextureEACRG11UTest, Test) {}
TEST_P(CompressedTextureEACRG11STest, Test) {}

TEST_P(CompressedTextureETC2RGB8Test,       Test) {}
TEST_P(CompressedTextureETC2RGB8SRGBTest,   Test) {}
TEST_P(CompressedTextureETC2RGB8A1Test,     Test) {}
TEST_P(CompressedTextureETC2RGB8A1SRGBTest, Test) {}
TEST_P(CompressedTextureETC2RGBA8Test,      Test) {}
TEST_P(CompressedTextureETC2RGBA8SRGBTest,  Test) {}

TEST_P(CompressedTextureASTCTest,         Test) {}
TEST_P(CompressedTextureASTCSliced3DTest, Test) {}

TEST_P(CompressedTexturePVRTC1Test,     Test) {}
TEST_P(CompressedTexturePVRTC1SRGBTest, Test) {}
// clang-format on
}  // namespace