chromium/third_party/angle/src/tests/compiler_tests/KHR_blend_equation_advanced_test.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.
//
// KHR_blend_equation_advanced_test.cpp:
//   Test for KHR_blend_equation_advanced and KHR_blend_equation_advanced_coherent
//

#include "tests/test_utils/ShaderExtensionTest.h"

#include "common/PackedEnums.h"

namespace
{
const char EXTPragma[] =;

// Use the multiply equation for blending
const char ESSL310_Simple[] =;

const char ESSL310_DeclaredMultiplyScreenSeparately[] =;

const char ESSL310_DeclaredMultiplyScreenSuccessively[] =;

const char ESSL310_With_FramebufferFetch[] =;

const char ESSL310_With_FramebufferFetchVec3[] =;

class KHRBlendEquationAdvancedTest : public sh::ShaderExtensionTest
{};

class KHRBlendEquationAdvancedES310Test : public KHRBlendEquationAdvancedTest
{};

// Extension flag is required to compile properly. Expect failure when it is not present.
TEST_P(KHRBlendEquationAdvancedES310Test, CompileFailsWithoutExtension)
{}

// Extension directive is required to compile properly. Expect failure when it is not present.
TEST_P(KHRBlendEquationAdvancedES310Test, CompileFailsWithExtensionWithoutPragma)
{}

INSTANTIATE_TEST_SUITE_P();

#if defined(ANGLE_ENABLE_VULKAN)

class KHRBlendEquationAdvancedSuccessTest : public KHRBlendEquationAdvancedTest
{};

class KHRBlendEquationAdvancedES310SuccessTest : public KHRBlendEquationAdvancedSuccessTest
{};

// With extension flag and extension directive, compiling succeeds.  Also test that the extension
// directive state is reset correctly.
TEST_P(KHRBlendEquationAdvancedES310SuccessTest, CompileSucceedsWithExtensionAndPragma)
{}

// Same as CompileSucceedsWithExtensionAndPragma but with emulation.
TEST_P(KHRBlendEquationAdvancedES310SuccessTest, CompileSucceedsWithExtensionAndPragmaWithEmulation)
{}

// The SL #version 100 shaders that are correct work similarly
// in both GL2 and GL3, with and without the version string.
INSTANTIATE_TEST_SUITE_P();

class KHRBlendEquationAdvancedEnabledListCheckTest : public KHRBlendEquationAdvancedTest
{};

class KHRBlendEquationAdvancedEnabledSeparatelyTest
    : public KHRBlendEquationAdvancedEnabledListCheckTest
{};

// Test for declaring different blend equations in separate layout declarations
TEST_P(KHRBlendEquationAdvancedEnabledSeparatelyTest, DeclaredEquationSeparately)
{}

// Same as DeclaredEquationSeparately but with emulation.
TEST_P(KHRBlendEquationAdvancedEnabledSeparatelyTest, DeclaredEquationSeparatelyWithEmulation)
{}

INSTANTIATE_TEST_SUITE_P();

class KHRBlendEquationAdvancedEnabledSuccessivelyTest
    : public KHRBlendEquationAdvancedEnabledListCheckTest
{};

// Test for declaring different blend equations in the same layout declaration
TEST_P(KHRBlendEquationAdvancedEnabledSuccessivelyTest, DeclaredEquationSuccessively)
{}

INSTANTIATE_TEST_SUITE_P();

#endif

}  // anonymous namespace