[Piglit] [PATCH] glsl-1.50: fix some linker tests

Chris Forbes chrisf at ijw.co.nz
Sun Jan 11 19:49:22 PST 2015


Oops.

Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>

On Wed, Dec 24, 2014 at 7:12 PM, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> From: Timothy Arceri <t.arceri at bom.gov.au>
>
> dont assign values to shader inputs
> ---
>  I didn't realise my mistake as Mesa currently allows
>  inputs to change. I'm working on some Mesa fixes for
>  this.
>
>  .../intrastage-unsized-interface-array-mismatch.shader_test | 12 +++++-------
>  ...intrastage-unsized-interface-array-mismatch2.shader_test | 13 +++++--------
>  .../linker/intrastage-unsized-interface-array.shader_test   | 12 +++++-------
>  .../linker/intrastage-unsized-interface-array2.shader_test  | 13 +++++--------
>  4 files changed, 20 insertions(+), 30 deletions(-)
>
> diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test
> index 9e373a2..7072659 100644
> --- a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test
> +++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch.shader_test
> @@ -14,6 +14,7 @@ out ArrayInterfaceBlock
>
>  void main()
>  {
> +  i.a = vec4(1.0);
>    gl_Position = vec4(1.0);
>  }
>
> @@ -28,9 +29,9 @@ in ArrayInterfaceBlock
>    vec4 a;
>  } i[4];
>
> -void f()
> +vec4 f()
>  {
> -  i[1].a = vec4(1, 0, 0, 1);
> +  return i[1].a;
>  }
>
>  [geometry shader]
> @@ -41,14 +42,11 @@ in ArrayInterfaceBlock
>    vec4 a;
>  } i[];
>
> -void f();
> +vec4 f();
>
>  void main()
>  {
> -  f();
> -  i[4].a = vec4(1, 0, 0, 1);
> -
> -  gl_Position = i[3].a;
> +  gl_Position = i[4].a + f();
>  }
>
>  [test]
> diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test
> index d661795..e7f1195 100644
> --- a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test
> +++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array-mismatch2.shader_test
> @@ -14,6 +14,7 @@ out ArrayInterfaceBlock
>
>  void main()
>  {
> +  i.a = vec4(1.0);
>    gl_Position = vec4(1.0);
>  }
>
> @@ -25,15 +26,14 @@ in ArrayInterfaceBlock
>    vec4 a;
>  } i[];
>
> -void f()
> +vec4 f()
>  {
> -  i[4].a = vec4(1, 0, 0, 1);
> +  return i[4].a;
>  }
>
>  [geometry shader]
>  #version 150
>
> -
>  layout(lines_adjacency) in;
>  layout(triangle_strip, max_vertices = 3) out;
>
> @@ -42,14 +42,11 @@ in ArrayInterfaceBlock
>    vec4 a;
>  } i[4];
>
> -void f();
> +vec4 f();
>
>  void main()
>  {
> -  f();
> -  i[3].a = vec4(1, 0, 0, 1);
> -
> -  gl_Position = i[3].a;
> +  gl_Position = i[3].a + f();
>  }
>
>  [test]
> diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test
> index 1dfae4f..06430c2 100644
> --- a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test
> +++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array.shader_test
> @@ -14,6 +14,7 @@ out ArrayInterfaceBlock
>
>  void main()
>  {
> +  i.a = vec4(1.0);
>    gl_Position = vec4(1.0);
>  }
>
> @@ -28,9 +29,9 @@ in ArrayInterfaceBlock
>    vec4 a;
>  } i[4];
>
> -void f()
> +vec4 f()
>  {
> -  i[1].a = vec4(1, 0, 0, 1);
> +  return i[1].a;
>  }
>
>  [geometry shader]
> @@ -41,14 +42,11 @@ in ArrayInterfaceBlock
>    vec4 a;
>  } i[];
>
> -void f();
> +vec4 f();
>
>  void main()
>  {
> -  f();
> -  i[3].a = vec4(1, 0, 0, 1);
> -
> -  gl_Position = i[3].a;
> +  gl_Position = i[3].a + f();
>  }
>
>  [test]
> diff --git a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test
> index 1ad5b08..1ddc975 100644
> --- a/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test
> +++ b/tests/spec/glsl-1.50/linker/intrastage-unsized-interface-array2.shader_test
> @@ -14,6 +14,7 @@ out ArrayInterfaceBlock
>
>  void main()
>  {
> +  i.a = vec4(1.0);
>    gl_Position = vec4(1.0);
>  }
>
> @@ -25,15 +26,14 @@ in ArrayInterfaceBlock
>    vec4 a;
>  } i[];
>
> -void f()
> +vec4 f()
>  {
> -  i[3].a = vec4(1, 0, 0, 1);
> +  return i[3].a;
>  }
>
>  [geometry shader]
>  #version 150
>
> -
>  layout(lines_adjacency) in;
>  layout(triangle_strip, max_vertices = 3) out;
>
> @@ -42,14 +42,11 @@ in ArrayInterfaceBlock
>    vec4 a;
>  } i[4];
>
> -void f();
> +vec4 f();
>
>  void main()
>  {
> -  f();
> -  i[3].a = vec4(1, 0, 0, 1);
> -
> -  gl_Position = i[3].a;
> +  gl_Position = i[3].a + f();
>  }
>
>  [test]
> --
> 2.1.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list