Hmm is there some reason this has to be a compile time decision as compared to use of the piglit_is_gles() function?
Here's a link to the patch that I had posted on the 18th. http://lists.freedesktop.org/archives/piglit/2013-February/004952.html On Wed, Feb 27, 2013 at 12:32 PM, Paul Berry <[email protected]> wrote: > glslparsertest should only check for the presence of > GL_ARB_ES{2,3}_compatibility when the test is running under desktop > GL. GLES never exposes these extensions. > --- > tests/glslparsertest/glslparsertest.c | 36 > ++++++++++++++++++++++++----------- > 1 file changed, 25 insertions(+), 11 deletions(-) > > diff --git a/tests/glslparsertest/glslparsertest.c > b/tests/glslparsertest/glslparsertest.c > index 26a558f..43bef03 100644 > --- a/tests/glslparsertest/glslparsertest.c > +++ b/tests/glslparsertest/glslparsertest.c > @@ -366,6 +366,30 @@ parse_glsl_version_string(const char *str) > return parse_glsl_version_number(str); > } > > + > +static void > +check_version(unsigned glsl_version) > +{ > +#ifdef PIGLIT_USE_OPENGL > + if (requested_version == 100) { > + piglit_require_extension("GL_ARB_ES2_compatibility"); > + return; > + } else if (requested_version == 300) { > + piglit_require_extension("GL_ARB_ES3_compatibility"); > + return; > + } > +#endif > + > + if (glsl_version < requested_version) { > + fprintf(stderr, > + "GLSL version is %u.%u, but requested version %u.%u > is required\n", > + glsl_version / 100, glsl_version % 100, > + requested_version / 100, requested_version % 100); > + piglit_report_result(PIGLIT_SKIP); > + } > +} > + > + > void > piglit_init(int argc, char**argv) > { > @@ -406,17 +430,7 @@ piglit_init(int argc, char**argv) > if (glsl_version_string != NULL) > glsl_version = parse_glsl_version_string(glsl_version_string); > > - if (requested_version == 100) { > - piglit_require_extension("GL_ARB_ES2_compatibility"); > - } else if (requested_version == 300) { > - piglit_require_extension("GL_ARB_ES3_compatibility"); > - } else if (glsl_version < requested_version) { > - fprintf(stderr, > - "GLSL version is %u.%u, but requested version %u.%u > is required\n", > - glsl_version / 100, glsl_version % 100, > - requested_version / 100, requested_version % 100); > - piglit_report_result(PIGLIT_SKIP); > - } > + check_version(glsl_version); > > for (i = 4; i < argc; i++) { > if (argv[i][0] == '!') { > -- > 1.8.1.4 > > _______________________________________________ > Piglit mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/piglit -- Regards, Tom "Where's the kaboom!? There was supposed to be an earth-shattering kaboom!" Marvin Martian Tech Lead, Graphics Working Group | Linaro.org │ Open source software for ARM SoCs w) tom.gall att linaro.org h) tom_gall att mac.com _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
