Hash :
a70ef7fc
Author :
Date :
2024-04-25T14:19:50
Add EGL_ANGLE_no_error for disabling EGL validation. Chrome makes many small EGL calls that can have proportionally expensive validation. Bug: angleproject:8434 Change-Id: I4f4d0e6eff64839f76a0f7bf48e5c94b8df9d809 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5491459 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
//
// Copyright 2024 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.
//
// EGLNoErrorTest.cpp:
// Tests for the EGL extension EGL_ANGLE_no_error
//
#include <gtest/gtest.h>
#include "test_utils/ANGLETest.h"
using namespace angle;
class EGLNoErrorTest : public ANGLETest<>
{};
// Validation errors become undefined behavour with this extension. Simply test turning validation
// off and on.
TEST_P(EGLNoErrorTest, EnableDisable)
{
if (IsEGLClientExtensionEnabled("EGL_ANGLE_no_error"))
{
eglSetValidationEnabledANGLE(EGL_FALSE);
eglSetValidationEnabledANGLE(EGL_TRUE);
EXPECT_EGL_ERROR(EGL_SUCCESS);
}
else
{
eglSetValidationEnabledANGLE(EGL_FALSE);
EXPECT_EGL_ERROR(EGL_BAD_ACCESS);
}
}
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(EGLNoErrorTest);
ANGLE_INSTANTIATE_TEST(EGLNoErrorTest,
ES2_D3D9(),
ES2_D3D11(),
ES3_D3D11(),
ES2_OPENGL(),
ES3_OPENGL(),
ES2_VULKAN());