[Piglit] [PATCH 1/2] vs-loop-zero-iterations-two-exits2: Fix on Mesa.

Alejandro Piñeiro apinheiro at igalia.com
Wed Sep 28 16:28:23 UTC 2016


Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>

On 28/09/16 17:38, Eric Anholt wrote:
> Mesa eliminates the loop and therefore the loop_count uniform, which
> causes shader_runner to report failure when it tries to set it.
> ---
>  .../execution/vs-loop-zero-iterations-two-exits2.shader_test          | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/spec/glsl-1.10/execution/vs-loop-zero-iterations-two-exits2.shader_test b/tests/spec/glsl-1.10/execution/vs-loop-zero-iterations-two-exits2.shader_test
> index 7443fd5197f1..4e306527b862 100644
> --- a/tests/spec/glsl-1.10/execution/vs-loop-zero-iterations-two-exits2.shader_test
> +++ b/tests/spec/glsl-1.10/execution/vs-loop-zero-iterations-two-exits2.shader_test
> @@ -10,8 +10,10 @@ uniform int loop_count;
>  void main()
>  {
>    gl_Position = gl_Vertex;
> +  /* Make sure that loop_count uniform live */
> +  float one = float(loop_count == 0 || loop_count == 1);
>  
> -  vec4 colour = vec4(1.0, 0.0, 0.0, 1.0);
> +  vec4 colour = vec4(1.0, 0.0, 0.0, one);
>  
>    for (int i = 0; i < 0; i++) {
>       colour = vec4(0.0, 1.0, 0.0, 1.0);
> 

-- 
Alejandro Piñeiro <apinheiro at igalia.com>


More information about the Piglit mailing list