From: Ian Romanick <[email protected]>

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 <[email protected]>
---
 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

_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to