Commit a8c947c7 by Brandon Schade Committed by Commit Bot

Enabled GL_KHR_no_error

Enabled GL_KHR_no_error added end2end tests for it Note that GL_KHR_no_error can only be enabled by setting the EGL attribute currently. Context flags are not currently supported. Bug: angleproject:1280 Test: angle_end2end_tests --gtest_filter=ContextNoErrorTest.* Change-Id: Ib5c73b8e284e3e4e5f800750ad6fcbef77be4285 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2068899Reviewed-by: 's avatarMohan Maiya <m.maiya@samsung.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 0837bf75
...@@ -943,8 +943,7 @@ const ExtensionInfoMap &GetExtensionInfoMap() ...@@ -943,8 +943,7 @@ const ExtensionInfoMap &GetExtensionInfoMap()
map["GL_OES_vertex_type_10_10_10_2"] = enableableExtension(&Extensions::vertexAttribType1010102OES); map["GL_OES_vertex_type_10_10_10_2"] = enableableExtension(&Extensions::vertexAttribType1010102OES);
map["GL_KHR_debug"] = esOnlyExtension(&Extensions::debug); map["GL_KHR_debug"] = esOnlyExtension(&Extensions::debug);
map["GL_OES_texture_border_clamp"] = enableableExtension(&Extensions::textureBorderClampOES); map["GL_OES_texture_border_clamp"] = enableableExtension(&Extensions::textureBorderClampOES);
// TODO(jmadill): Enable this when complete. map["GL_KHR_no_error"] = esOnlyExtension(&Extensions::noError);
//map["GL_KHR_no_error"] = esOnlyExtension(&Extensions::noError);
map["GL_ANGLE_lossy_etc_decode"] = enableableExtension(&Extensions::lossyETCDecode); map["GL_ANGLE_lossy_etc_decode"] = enableableExtension(&Extensions::lossyETCDecode);
map["GL_CHROMIUM_bind_uniform_location"] = esOnlyExtension(&Extensions::bindUniformLocation); map["GL_CHROMIUM_bind_uniform_location"] = esOnlyExtension(&Extensions::bindUniformLocation);
map["GL_CHROMIUM_sync_query"] = enableableExtension(&Extensions::syncQuery); map["GL_CHROMIUM_sync_query"] = enableableExtension(&Extensions::syncQuery);
...@@ -1355,8 +1354,7 @@ std::vector<std::string> DisplayExtensions::getStrings() const ...@@ -1355,8 +1354,7 @@ std::vector<std::string> DisplayExtensions::getStrings() const
InsertExtensionString("EGL_ANGLE_create_context_backwards_compatible", createContextBackwardsCompatible, &extensionStrings); InsertExtensionString("EGL_ANGLE_create_context_backwards_compatible", createContextBackwardsCompatible, &extensionStrings);
InsertExtensionString("EGL_KHR_no_config_context", noConfigContext, &extensionStrings); InsertExtensionString("EGL_KHR_no_config_context", noConfigContext, &extensionStrings);
InsertExtensionString("EGL_IMG_context_priority", contextPriority, &extensionStrings); InsertExtensionString("EGL_IMG_context_priority", contextPriority, &extensionStrings);
// TODO(jmadill): Enable this when complete. InsertExtensionString("EGL_KHR_create_context_no_error", createContextNoError, &extensionStrings);
//InsertExtensionString("KHR_create_context_no_error", createContextNoError, &extensionStrings);
// clang-format on // clang-format on
return extensionStrings; return extensionStrings;
......
...@@ -1555,7 +1555,7 @@ void StateManager11::processFramebufferInvalidation(const gl::Context *context) ...@@ -1555,7 +1555,7 @@ void StateManager11::processFramebufferInvalidation(const gl::Context *context)
mCurDisableStencil = disableStencil; mCurDisableStencil = disableStencil;
} }
bool multiSample = (fbo->getCachedSamples(context, gl::AttachmentSampleType::Emulated) != 0); bool multiSample = (fbo->getSamples(context) != 0);
if (multiSample != mCurRasterState.multiSample) if (multiSample != mCurRasterState.multiSample)
{ {
mInternalDirtyBits.set(DIRTY_BIT_RASTERIZER_STATE); mInternalDirtyBits.set(DIRTY_BIT_RASTERIZER_STATE);
......
...@@ -36,6 +36,7 @@ angle_end2end_tests_sources = [ ...@@ -36,6 +36,7 @@ angle_end2end_tests_sources = [
"gl_tests/ColorMaskTest.cpp", "gl_tests/ColorMaskTest.cpp",
"gl_tests/ComputeShaderTest.cpp", "gl_tests/ComputeShaderTest.cpp",
"gl_tests/ContextLostTest.cpp", "gl_tests/ContextLostTest.cpp",
"gl_tests/ContextNoErrorTest.cpp",
"gl_tests/CopyCompressedTextureTest.cpp", "gl_tests/CopyCompressedTextureTest.cpp",
"gl_tests/CopyTexImageTest.cpp", "gl_tests/CopyTexImageTest.cpp",
"gl_tests/CopyTexture3DTest.cpp", "gl_tests/CopyTexture3DTest.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"
using namespace angle;
class ContextNoErrorTest : public ANGLETest
{
protected:
ContextNoErrorTest() : mNaughtyTexture(0) { setNoErrorEnabled(true); }
void testTearDown() override
{
if (mNaughtyTexture != 0)
{
glDeleteTextures(1, &mNaughtyTexture);
}
}
void bindNaughtyTexture()
{
glGenTextures(1, &mNaughtyTexture);
ASSERT_GL_NO_ERROR();
glBindTexture(GL_TEXTURE_CUBE_MAP, mNaughtyTexture);
ASSERT_GL_NO_ERROR();
// mNaughtyTexture should now be a GL_TEXTURE_CUBE_MAP texture, so rebinding it to
// GL_TEXTURE_2D is an error
glBindTexture(GL_TEXTURE_2D, mNaughtyTexture);
}
GLuint mNaughtyTexture;
};
// Tests that error reporting is suppressed when GL_KHR_no_error is enabled
TEST_P(ContextNoErrorTest, NoError)
{
ANGLE_SKIP_TEST_IF(!IsGLExtensionEnabled("GL_KHR_no_error"));
bindNaughtyTexture();
EXPECT_GL_NO_ERROR();
}
ANGLE_INSTANTIATE_TEST_ES2_AND_ES3(ContextNoErrorTest);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment