On 16 August 2013 13:33, Ian Romanick <i...@freedesktop.org> wrote:

> From: Ian Romanick <ian.d.roman...@intel.com>
>
> NVIDIA's compiler (304.64 on a GTX 260) generates the error messages:
>
> 0(5) : error C7539: GLSL 1.20 does not allow nested structs
> 0(9) : error C7539: GLSL 1.20 does not allow nested structs
>
> Our compiler was even generating the error messages:
>

Since a small number of non-Mesa developers use Piglit, you might consider
changing "Our compiler" to "Mesa's compiler".

Either way, this patch is:

Reviewed-by: Paul Berry <stereotype...@gmail.com>


>
> 0:7(2): error: embedded structure declartions are not allowed
> 0:13(2): error: embedded structure declartions are not allowed
>
> Signed-off-by: Ian Romanick <ian.d.roman...@intel.com>
> ---
>  .../uniform_buffer/fs-struct-pad.shader_test       | 27
> +++++++++++++---------
>  .../uniform_buffer/vs-struct-pad.shader_test       | 27
> +++++++++++++---------
>  2 files changed, 32 insertions(+), 22 deletions(-)
>
> diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test
> b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test
> index a2202ff..b2a0141 100644
> --- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test
> +++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test
> @@ -14,18 +14,23 @@ void main()
>  [fragment shader]
>  #version 140
>
> +struct S1 {
> +       float r;
> +};
> +
> +struct S2 {
> +       float g;
> +       float b;
> +       float a;
> +};
> +
> +struct S {
> +       S1 s1;
> +       S2 s2;
> +};
> +
>  uniform ubo1 {
> -       struct S {
> -               struct S1 {
> -                       float r;
> -               } s1;
> -
> -               struct S2 {
> -                       float g;
> -                       float b;
> -                       float a;
> -               } s2;
> -       } s;
> +       S s;
>  };
>
>  void main()
> diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-pad.shader_test
> b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-pad.shader_test
> index 7390ea8..b283b69 100644
> --- a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-pad.shader_test
> +++ b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-pad.shader_test
> @@ -4,18 +4,23 @@ GLSL >= 1.40
>  [vertex shader]
>  #version 140
>
> +struct S1 {
> +       float r;
> +};
> +
> +struct S2 {
> +       float g;
> +       float b;
> +       float a;
> +};
> +
> +struct S {
> +       S1 s1;
> +       S2 s2;
> +};
> +
>  uniform ubo1 {
> -       struct S {
> -               struct S1 {
> -                       float r;
> -               } s1;
> -
> -               struct S2 {
> -                       float g;
> -                       float b;
> -                       float a;
> -               } s2;
> -       } s;
> +       S s;
>  };
>
>  in vec4 vertex;
> --
> 1.8.1.4
>
> _______________________________________________
> Piglit mailing list
> Piglit@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to