[Piglit] [PATCH 3/3] glsl-1.40: Don't try to use embedded struct definitions
Chris Forbes
chrisf at ijw.co.nz
Sat Jun 14 17:53:23 PDT 2014
This isn't explicitly disallowed in the ARB_ubo spec or the GLSL
1.40 spec, but is very clear in the 1.50 spec. I believe this is a
clarification, not a change.
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
.../uniform_buffer/fs-struct-copy-complicated.shader_test | 12 +++++++-----
.../glsl-1.40/uniform_buffer/fs-struct-copy.shader_test | 8 +++++---
tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test | 14 ++++++++------
.../uniform_buffer/vs-struct-copy-complicated.shader_test | 12 +++++++-----
.../glsl-1.40/uniform_buffer/vs-struct-copy.shader_test | 8 +++++---
tests/spec/glsl-1.40/uniform_buffer/vs-struct.shader_test | 14 ++++++++------
6 files changed, 40 insertions(+), 28 deletions(-)
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test
index 0b7ae39..cef72ba 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated.shader_test
@@ -11,12 +11,14 @@ struct S2 {
mat2 m22[2];
};
+struct S {
+ S2 arr[2];
+ vec3 v3;
+ bool b;
+};
+
uniform ubo1 {
- struct S {
- S2 arr[2];
- vec3 v3;
- bool b;
- } s[2];
+ S s[2];
};
void main()
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test
index 8acab2a..beb01c4 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-copy.shader_test
@@ -6,10 +6,12 @@ GLSL >= 1.40
[fragment shader]
#version 140
+struct S {
+ vec4 a, b, c, d;
+};
+
uniform ubo1 {
- struct S {
- vec4 a, b, c, d;
- } colors;
+ S colors;
};
void main()
diff --git a/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test b/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test
index 66b5971..328d181 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct.shader_test
@@ -6,13 +6,15 @@ GLSL >= 1.40
[fragment shader]
#version 140
+struct S {
+ float r;
+ float g;
+ float b;
+ float a;
+};
+
uniform ubo1 {
- struct S {
- float r;
- float g;
- float b;
- float a;
- } s;
+ S s;
};
void main()
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy-complicated.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy-complicated.shader_test
index ec7db43..ef24435 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy-complicated.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy-complicated.shader_test
@@ -9,12 +9,14 @@ struct S2 {
mat2 m22[2];
};
+struct S {
+ S2 arr[2];
+ vec3 v3;
+ bool b;
+};
+
uniform ubo1 {
- struct S {
- S2 arr[2];
- vec3 v3;
- bool b;
- } s[2];
+ S s[2];
};
in vec4 piglit_vertex;
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy.shader_test
index daf742e..e713c64 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-copy.shader_test
@@ -4,10 +4,12 @@ GLSL >= 1.40
[vertex shader]
#version 140
+struct S {
+ vec4 a, b, c, d;
+};
+
uniform ubo1 {
- struct S {
- vec4 a, b, c, d;
- } colors;
+ S colors;
};
in vec4 piglit_vertex;
diff --git a/tests/spec/glsl-1.40/uniform_buffer/vs-struct.shader_test b/tests/spec/glsl-1.40/uniform_buffer/vs-struct.shader_test
index 6b7ff53..f2fc3a6 100644
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-struct.shader_test
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-struct.shader_test
@@ -4,13 +4,15 @@ GLSL >= 1.40
[vertex shader]
#version 140
+struct S {
+ float r;
+ float g;
+ float b;
+ float a;
+};
+
uniform ubo1 {
- struct S {
- float r;
- float g;
- float b;
- float a;
- } s;
+ S s;
};
in vec4 piglit_vertex;
--
2.0.0
More information about the Piglit
mailing list