chromium/third_party/angle/src/tests/gl_tests/WebGLCompressedTextureAvailabilityTest.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.
//
// WebGLCompressedTextureAvailabilityTest:
//   Compressed formats must be enabled on platforms that always support them.
//   Compressed formats must be disabled on platforms that never support them.
//

#include "test_utils/ANGLETest.h"

usingnamespaceangle;

namespace
{

class WebGLCompressedTextureAvailabilityTest : public ANGLETest<>
{};

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

const char kETC1[]    =;
const char kETC1Sub[] =;  // Not exposed to WebGL apps
const char kETC2[]    =;

const char kASTCLDR[] =;
const char kASTCHDR[] =;

const char kPVRTC1[] =;

// Test compressed formats availability
TEST_P(WebGLCompressedTextureAvailabilityTest, Test)
{}

// Regression test for emulated ETC1 being exposed to WebGL contexts.
//
// Relies on the fact that ETC1 is a strict subset of ETC2 and the ANGLE-specific ETC2 extension
// string is exposed only when the hardware support is available. Hardware support for ETC1
// without ETC2 exists only on native OpenGL ES.
//
// Note that non-WebGL contexts are allowed to expose emulated ETC1.
// https://crbug.com/1048244
TEST_P(WebGLCompressedTextureAvailabilityTest, EmulatedEtc1Test)
{}

ANGLE_INSTANTIATE_TEST_ES2_AND_ES3();

}  // namespace