<div dir="ltr">On 16 August 2013 13:33, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
<br>
NVIDIA's compiler (304.64 on a GTX 260) generates the error messages:<br>
<br>
0(5) : error C7539: GLSL 1.20 does not allow nested structs<br>
0(9) : error C7539: GLSL 1.20 does not allow nested structs<br>
<br>
Our compiler was even generating the error messages:<br></blockquote><div><br></div><div>Since a small number of non-Mesa developers use Piglit, you might consider changing "Our compiler" to "Mesa's compiler".<br>
<br>Either way, this patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
0:7(2): error: embedded structure declartions are not allowed<br>
0:13(2): error: embedded structure declartions are not allowed<br>
<br>
Signed-off-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
---<br>
.../uniform_buffer/fs-struct-pad.shader_test | 27 +++++++++++++---------<br>
.../uniform_buffer/vs-struct-pad.shader_test | 27 +++++++++++++---------<br>
2 files changed, 32 insertions(+), 22 deletions(-)<br>
<br>
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<br>
index a2202ff..b2a0141 100644<br>
--- a/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test<br>
+++ b/tests/spec/glsl-1.40/uniform_buffer/fs-struct-pad.shader_test<br>
@@ -14,18 +14,23 @@ void main()<br>
[fragment shader]<br>
#version 140<br>
<br>
+struct S1 {<br>
+ float r;<br>
+};<br>
+<br>
+struct S2 {<br>
+ float g;<br>
+ float b;<br>
+ float a;<br>
+};<br>
+<br>
+struct S {<br>
+ S1 s1;<br>
+ S2 s2;<br>
+};<br>
+<br>
uniform ubo1 {<br>
- struct S {<br>
- struct S1 {<br>
- float r;<br>
- } s1;<br>
-<br>
- struct S2 {<br>
- float g;<br>
- float b;<br>
- float a;<br>
- } s2;<br>
- } s;<br>
+ S s;<br>
};<br>
<br>
void main()<br>
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<br>
index 7390ea8..b283b69 100644<br>
--- a/tests/spec/glsl-1.40/uniform_buffer/vs-struct-pad.shader_test<br>
+++ b/tests/spec/glsl-1.40/uniform_buffer/vs-struct-pad.shader_test<br>
@@ -4,18 +4,23 @@ GLSL >= 1.40<br>
[vertex shader]<br>
#version 140<br>
<br>
+struct S1 {<br>
+ float r;<br>
+};<br>
+<br>
+struct S2 {<br>
+ float g;<br>
+ float b;<br>
+ float a;<br>
+};<br>
+<br>
+struct S {<br>
+ S1 s1;<br>
+ S2 s2;<br>
+};<br>
+<br>
uniform ubo1 {<br>
- struct S {<br>
- struct S1 {<br>
- float r;<br>
- } s1;<br>
-<br>
- struct S2 {<br>
- float g;<br>
- float b;<br>
- float a;<br>
- } s2;<br>
- } s;<br>
+ S s;<br>
};<br>
<br>
in vec4 vertex;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.1.4<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br></div></div>