[Piglit] [PATCH 1/2] shader_runner regression with gles

Chad Versace chad.versace at linux.intel.com
Mon Jan 21 14:27:51 PST 2013


On 01/17/2013 03:08 PM, Tom Gall wrote:
> Augment the parser that examines the shader_test file passed in
> with the test to determine which brand of shader_running to
> execute, shader_runner, shader_runner_gles2, etc.
> 
> This fixes a bug where GLSL ES if first in the [required] section
> could match against GL after which the wrong shader_runner command
> would be used due to the wrong gl api being used.
> 
> Last if plain GLSL is found, GL is presumed as the api. If GLSL ES
> is found, GL ES is presumed as the api.
> 
> When dispatch is implemented for GLES all this can go away.
> 
> Signed-off-by: Tom Gall <tom.gall at linaro.org>
> ---

I second Paul's review of this patch.

One more thing: this file follows PEP8 by using a 4-space indent. The patch
introduces tabs in the if-tree that cause misalignment. See below.

>                          elif cls.__re_gles3.match(line) is not None:
>                              self.__gl_api = ShaderTest.API_GLES3
>                              return
> +                        elif cls.__re_glsles.match(line) is not None:
> +							if self.__gl_api is None:
> +								self.__gl_api = ShaderTest.API_GLES2
> +							return
> +                        elif cls.__re_glsl.match(line) is not None:
> +							if self.__gl_api is None:
> +								self.__gl_api = ShaderTest.API_GL
> +							return
> +                        elif cls.__re_gl.match(line) is not None:
> +                            self.__gl_api = ShaderTest.API_GL
> +                            return
>                          elif cls.__re_gl_unknown.match(line) is not None:
>                              self.__report_failure("Failed to parse GL requirement: " + line)
>                              self.__gl_api = ShaderTest.API_ERROR
> 



More information about the Piglit mailing list