Skip to content

Commit aa53373

Browse files
timvpGoogleAngle LUCI CQ
authored andcommitted
CreateGeometryShaderInES3: Skip on ES3.1+
When testing the system EGL (angle_test_enable_system_egl = true), the context returned is the maximally conformant version, which can be OpenGL ES 3.2. The test GeometryShaderTestES3.CreateGeometryShaderInES3 verifies that geometry shaders cannot be created, assuming it will only ever be testing ES 3.0 contexts. 1. Add ANGLE_INSTANTIATE_TEST_ES3_AND_ES31_AND_ES32() to instantiate a test for ES 3.0, 3.1, and 3.2. 2. Update GeometryShaderTestES3.CreateGeometryShaderInES3 to skip when testing ES 3.1+ contexts. 3. Instantiate GeometryShaderTestES3 for ES 3.0, 3.1, and 3.2. Bug: b/409384875 Test: GeometryShaderTestES3 Change-Id: Ic5b4dbb167b8de7f24da285b4620f5257ed7df54 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6794766 Reviewed-by: Amirali Abdolrashidi <[email protected]> Commit-Queue: Tim Van Patten <[email protected]> Reviewed-by: Shahbaz Youssefi <[email protected]>
1 parent 4189fbb commit aa53373

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/tests/gl_tests/GeometryShaderTest.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ class GeometryShaderTestES32 : public GeometryShaderTest
108108
// ES 3.1 is required.
109109
TEST_P(GeometryShaderTestES3, CreateGeometryShaderInES3)
110110
{
111-
EXPECT_TRUE(!IsGLExtensionEnabled("GL_EXT_geometry_shader"));
111+
// Only run the test against OpenGL ES 3.0.
112+
ANGLE_SKIP_TEST_IF(getClientMajorVersion() == 3 && getClientMinorVersion() > 0);
113+
// GL_EXT_geometry_shader requires OpenGL ES 3.1.
114+
ASSERT_FALSE(IsGLExtensionEnabled("GL_EXT_geometry_shader"));
115+
112116
GLuint geometryShader = glCreateShader(GL_GEOMETRY_SHADER_EXT);
113117
EXPECT_EQ(0u, geometryShader);
114118
EXPECT_GL_ERROR(GL_INVALID_ENUM);
@@ -2066,7 +2070,7 @@ void main()
20662070
}
20672071

20682072
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GeometryShaderTestES3);
2069-
ANGLE_INSTANTIATE_TEST_ES3(GeometryShaderTestES3);
2073+
ANGLE_INSTANTIATE_TEST_ES3_AND_ES31_AND_ES32(GeometryShaderTestES3);
20702074

20712075
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GeometryShaderTest);
20722076
ANGLE_INSTANTIATE_TEST_ES31_AND(GeometryShaderTest,

src/tests/test_utils/angle_test_instantiate.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,13 @@ struct CombinedPrintToStringParamName
271271
INSTANTIATE_TEST_SUITE_P(, testName, ANGLE_INSTANTIATE_TEST_PLATFORMS(testName), \
272272
testing::PrintToStringParamName())
273273

274+
#define ANGLE_INSTANTIATE_TEST_ES3_AND_ES31_AND_ES32(testName, ...) \
275+
const PlatformParameters testName##params[] = {ANGLE_ALL_TEST_PLATFORMS_ES3, \
276+
ANGLE_ALL_TEST_PLATFORMS_ES31, \
277+
ANGLE_ALL_TEST_PLATFORMS_ES32, __VA_ARGS__}; \
278+
INSTANTIATE_TEST_SUITE_P(, testName, ANGLE_INSTANTIATE_TEST_PLATFORMS(testName), \
279+
testing::PrintToStringParamName())
280+
274281
// Instantiate the test for a combination of N parameters and the
275282
// enumeration of platforms in the extra args, similar to
276283
// ANGLE_INSTANTIATE_TEST. The macros are defined only for the Ns

0 commit comments

Comments
 (0)