зеркало из https://github.com/AvaloniaUI/angle.git
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/1255142 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
This commit is contained in:
Родитель
d082819ca2
Коммит
38f24ee666
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче