[Piglit] [PATCH 1/2] glsl, gles2: add version 100

Ian Romanick idr at freedesktop.org
Fri Dec 14 15:19:43 PST 2012


On 12/13/2012 12:58 PM, Tom Gall wrote:
> This is a small change in two parts to repair support for
> gles2 by glslparsertest.
>
> To glslparsertest.c, add 100 into the list of versions the switch
> handles when passed from the command line instead of the default
> path. Next in piglit_init when version 100 is used, check for
> gles and if in use don't check for GL_ARB_ES2_compatibility.
>
> Rename the created testcase binary to be gles-2.0-glslparsertest
> so it's consistant with the gles-3.0 tests. (As well as consistant
> with the proposed new gles-2.0 tests)

Does this change any existing tests to change to SKIP from PASS or FAIL 
on desktop implementations that have GL_ARB_ES2_compatibility when an 
ES2 driver is not available (i.e., most distros out of the box)?  That's 
my only concern.  Otherwise, this change looks good.

We should probably make the analogous change for ES3.

> Signed-off-by: Tom Gall <tom.gall at linaro.org>
> ---
>   tests/glslparsertest/CMakeLists.gles2.txt |    4 +---
>   tests/glslparsertest/glslparsertest.c     |    6 +++++-
>   2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/tests/glslparsertest/CMakeLists.gles2.txt b/tests/glslparsertest/CMakeLists.gles2.txt
> index 1e37bed..da01453 100644
> --- a/tests/glslparsertest/CMakeLists.gles2.txt
> +++ b/tests/glslparsertest/CMakeLists.gles2.txt
> @@ -3,8 +3,6 @@ link_libraries(
>   	${OPENGL_gles2_LIBRARY}
>   	)
>
> -piglit_add_executable(glslparsertest_${piglit_target_api}
> -	glslparsertest.c
> -	)
> +piglit_add_executable(gles-2.0-glslparsertest glslparsertest.c)
>
>   # vim: ft=cmake:
> diff --git a/tests/glslparsertest/glslparsertest.c b/tests/glslparsertest/glslparsertest.c
> index ff32da7..c91a56b 100644
> --- a/tests/glslparsertest/glslparsertest.c
> +++ b/tests/glslparsertest/glslparsertest.c
> @@ -43,6 +43,10 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
>   		const unsigned int int_version = parse_glsl_version(argv[3]);
>
>   		switch (int_version) {
> +		case 100:
> +			config.supports_gl_compat_version = 10;
> +			config.supports_gl_es_version = 20;
> +			break;
>   		case 110:
>   		case 120:
>   		case 130:
> @@ -351,7 +355,7 @@ piglit_init(int argc, char**argv)
>   	if (glsl_version_string != NULL)
>   		glsl_version = parse_glsl_version(glsl_version_string);
>
> -	if (requested_version == 100) {
> +	if (!piglit_is_gles() && requested_version == 100) {
>   		piglit_require_extension("GL_ARB_ES2_compatibility");
>   	} else if (requested_version == 300) {
>   		piglit_require_extension("GL_ARB_ES3_compatibility");
>



More information about the Piglit mailing list