[Piglit] [PATCH] built-in-constants: Add geometry shader #extension work-around for ES
Ian Romanick
idr at freedesktop.org
Wed Aug 24 19:16:00 UTC 2016
From: Ian Romanick <ian.d.romanick at intel.com>
I thought I had this in my previous series, but I cannot find any
trace of it. Prevents a regression in
tests/spec/glsl-es-3.10/minimum-maximums.txt after
GL_OES_geometry_shader is enabled.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
tests/shaders/built-in-constants.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tests/shaders/built-in-constants.c b/tests/shaders/built-in-constants.c
index 41d0a99..75a3b30 100644
--- a/tests/shaders/built-in-constants.c
+++ b/tests/shaders/built-in-constants.c
@@ -462,6 +462,17 @@ piglit_init(int argc, char **argv)
} else if (glsl_version < required_glsl_version)
piglit_report_result(PIGLIT_SKIP);
+ /* Geometry shaders must use the #extension directive in GLSL ES
+ * before version 3.20.
+ */
+ if (es_shader && required_glsl_version < 320 &&
+ piglit_is_extension_supported("GL_OES_geometry_shader")) {
+ assert(num_required_extensions < ARRAY_SIZE(required_extensions));
+ required_extensions[num_required_extensions] =
+ strdup("GL_OES_geometry_shader");
+ num_required_extensions++;
+ }
+
/* Tessellation shaders must use the #extension directive. */
const char *const tess_ext_name = es_shader
? "GL_OES_tessellation_shader"
--
2.5.5
More information about the Piglit
mailing list