On Mon, Nov 13, 2017 at 12:48 PM, Juan A. Suarez Romero <jasua...@igalia.com> wrote: > GL_OES_geometry_shader and GL_OES_tessellation_shader specifications > require OpenGL ES Shading Language 3.10. > > GL_ARB_tessellation_shader specification requires GLSL 1.50. > --- > tests/shaders/built-in-constants.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/tests/shaders/built-in-constants.c > b/tests/shaders/built-in-constants.c > index d470fe1bf..6ad26dccf 100644 > --- a/tests/shaders/built-in-constants.c > +++ b/tests/shaders/built-in-constants.c > @@ -386,7 +386,7 @@ create_shader(GLenum type) > return 0; > } else { > if (is_tessellation_type(type) && > - (required_glsl_version < 400 && > + (required_glsl_version < 150 || > > !piglit_is_extension_supported("GL_ARB_tessellation_shader")))
I believe this code was correct as-is. With your version, you'll disallow a shader with #version 400 when the impl doesn't advertise the separate GL_ARB_tessellation_shader (which there's no requirement it advertise, AFAIK). The one thing is that it'll allow shaders through with required_glsl_version < 150 if the impl supports tess, but ... hard to care about that. > return 0; > > @@ -461,7 +461,7 @@ piglit_init(int argc, char **argv) > /* Geometry shaders must use the #extension directive in GLSL ES > * before version 3.20. > */ > - if (es_shader && required_glsl_version < 320 && > + if (es_shader && required_glsl_version == 310 && > piglit_is_extension_supported("GL_OES_geometry_shader")) { > assert(num_required_extensions < > ARRAY_SIZE(required_extensions)); > required_extensions[num_required_extensions] = What situation are you trying to fix here? > @@ -473,7 +473,9 @@ piglit_init(int argc, char **argv) > const char *const tess_ext_name = es_shader > ? "GL_OES_tessellation_shader" > : "GL_ARB_tessellation_shader"; > - if (piglit_is_extension_supported(tess_ext_name)) { > + if (((es_shader && required_glsl_version == 310) || > + (!es_shader && required_glsl_version >= 150)) && > + piglit_is_extension_supported(tess_ext_name)) { > assert(num_required_extensions < > ARRAY_SIZE(required_extensions)); > required_extensions[num_required_extensions] = > strdup(tess_ext_name); And here? _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit