Commit 38f24ee6 by Geoff Lang Committed by Commit Bot

Fix missing query for GL_NUM_REQUESTABLE_EXTENSIONS_ANGLE.

This enum was validated but not implemented. TEST=RequestExtensionTest.Queries BUG=890689 Change-Id: I7285e45cef53b197d61cd0dfa9d2bacb70e23e64 Reviewed-on: https://chromium-review.googlesource.com/1255142Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarYuly Novikov <ynovikov@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent d082819c
......@@ -1603,6 +1603,11 @@ void Context::getIntegervImpl(GLenum pname, GLint *params)
*params = static_cast<GLint>(mExtensionStrings.size());
break;
// GL_ANGLE_request_extension
case GL_NUM_REQUESTABLE_EXTENSIONS_ANGLE:
*params = static_cast<GLint>(mRequestableExtensionStrings.size());
break;
// GL_KHR_debug
case GL_MAX_DEBUG_MESSAGE_LENGTH:
*params = mExtensions.maxDebugMessageLength;
......
......@@ -34,12 +34,46 @@ TEST_P(RequestExtensionTest, ExtensionsDisabledByDefault)
}
}
// Test the queries for the requestable extension strings
TEST_P(RequestExtensionTest, Queries)
{
ANGLE_SKIP_TEST_IF(!extensionEnabled("GL_ANGLE_request_extension"));
const GLubyte *requestableExtString = glGetString(GL_REQUESTABLE_EXTENSIONS_ANGLE);
EXPECT_GL_NO_ERROR();
EXPECT_NE(nullptr, requestableExtString);
if (getClientMajorVersion() >= 3)
{
GLint numExtensions = 0;
glGetIntegerv(GL_NUM_REQUESTABLE_EXTENSIONS_ANGLE, &numExtensions);
EXPECT_GL_NO_ERROR();
for (GLint extIdx = 0; extIdx < numExtensions; extIdx++)
{
const GLubyte *requestableExtIndexedString =
glGetStringi(GL_REQUESTABLE_EXTENSIONS_ANGLE, extIdx);
EXPECT_GL_NO_ERROR();
EXPECT_NE(nullptr, requestableExtIndexedString);
}
// Request beyond the end of the array
const GLubyte *requestableExtIndexedString =
glGetStringi(GL_REQUESTABLE_EXTENSIONS_ANGLE, numExtensions);
EXPECT_GL_ERROR(GL_INVALID_VALUE);
EXPECT_EQ(nullptr, requestableExtIndexedString);
}
}
// Use this to select which configurations (e.g. which renderer, which GLES major version) these
// tests should be run against.
ANGLE_INSTANTIATE_TEST(RequestExtensionTest,
ES2_D3D11(),
ES3_D3D11(),
ES2_OPENGL(),
ES3_OPENGL(),
ES2_OPENGLES(),
ES3_OPENGLES(),
ES2_VULKAN());
} // namespace angle
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