[Piglit] [PATCH 1/2] glsl-1.40: Don't use embedded structure definitions
Paul Berry
stereotype441 at gmail.com
Mon Aug 19 10:16:47 PDT 2013
On 16 August 2013 13:33, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at 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 <stereotype441 at 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.romanick at 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130819/aa1bcf1c/attachment-0001.html>
More information about the Piglit
mailing list