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

//
// Copyright 2020 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.
//
// ContextNoErrorTest:
//   Tests pertaining to GL_KHR_no_error
//

#include <gtest/gtest.h>

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

usingnamespaceangle;

class ContextNoErrorTest : public ANGLETest<>
{};

class ContextNoErrorTestES3 : public ContextNoErrorTest
{};

class ContextNoErrorPPOTest31 : public ContextNoErrorTest
{};

void ContextNoErrorPPOTest31::bindProgramPipeline(const GLchar *vertString,
                                                  const GLchar *fragString)
{}

void ContextNoErrorPPOTest31::drawQuadWithPPO(const std::string &positionAttribName,
                                              const GLfloat positionAttribZ,
                                              const GLfloat positionAttribXYScale)
{}

// Tests that error reporting is suppressed when GL_KHR_no_error is enabled
TEST_P(ContextNoErrorTest, NoError)
{}

// Test glDetachShader to make sure it resolves linking with a no error context and doesn't assert
TEST_P(ContextNoErrorTest, DetachAfterLink)
{}

// Tests that we can draw with a program pipeline when GL_KHR_no_error is enabled.
TEST_P(ContextNoErrorPPOTest31, DrawWithPPO)
{}

// Test drawing with program and then with PPO to make sure it resolves linking of both the program
// and the PPO with a no error context.
TEST_P(ContextNoErrorPPOTest31, DrawWithProgramThenPPO)
{}

// Test glUseProgramStages with different programs
TEST_P(ContextNoErrorPPOTest31, UseProgramStagesWithDifferentPrograms)
{}

// Test glUseProgramStages with repeated calls to glUseProgramStages with the same programs.
TEST_P(ContextNoErrorPPOTest31, RepeatedCallToUseProgramStagesWithSamePrograms)
{}

// Tests that an incorrect enum to GetInteger does not cause an application crash.
TEST_P(ContextNoErrorTest, InvalidGetIntegerDoesNotCrash)
{}

// Test that we ignore an invalid texture type when EGL_KHR_create_context_no_error is enabled.
TEST_P(ContextNoErrorTest, InvalidTextureType)
{}

// Tests that we can draw with a program that is relinking when GL_KHR_no_error is enabled.
TEST_P(ContextNoErrorTestES3, DrawWithRelinkedProgram)
{}

ANGLE_INSTANTIATE_TEST_ES2_AND_ES3();

ANGLE_INSTANTIATE_TEST_ES3();

GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST();
ANGLE_INSTANTIATE_TEST_ES31();