On 2 November 2011 14:54, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="HOEnZb"><div class="h5">On 11/01/2011 02:27 PM, Paul Berry wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Some tests (in particular, glsl-link-initializer-03.c) assume that<br>
piglit_link_simple_program() attaches shaders in the same order that<br>
they appear in the parameter list. There's no good reason for<br>
piglit_link_simple_program() to attach them in the opposite order.<br>
---<br>
tests/util/piglit-shader.c | 4 ++--<br>
1 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/tests/util/piglit-shader.c b/tests/util/piglit-shader.c<br>
index c5c8c2d..3e0f935 100644<br>
--- a/tests/util/piglit-shader.c<br>
+++ b/tests/util/piglit-shader.c<br>
@@ -240,10 +240,10 @@ GLint piglit_link_simple_program(<u></u>GLint vs, GLint fs)<br>
piglit_require_GLSL();<br>
<br>
prog = piglit_CreateProgram();<br>
- if (fs)<br>
- piglit_AttachShader(prog, fs);<br>
if (vs)<br>
piglit_AttachShader(prog, vs);<br>
+ if (fs)<br>
+ piglit_AttachShader(prog, fs);<br>
piglit_LinkProgram(prog);<br>
<br>
if (!piglit_link_check_status(<u></u>prog)) {<br>
</blockquote>
<br></div></div>
Since there is an ordering dependency, would it maybe better to just have the test try linking the shaders in "all" the different orders? This would mean making more programs, but that should't be a problem.<br>
<br>
prog_a = piglit_link_simple_program(<u></u>vert[0], vert[1]);<br>
prog_b = piglit_link_simple_program(<u></u>vert[1], vert[0]);<br>
prog_c = piglit_link_simple_program(<u></u>vert[0], vert[2]);<br>
prog_d = piglit_link_simple_program(<u></u>vert[2], vert[0]);<br>
</blockquote></div><br>Sure, I would be fine with this. Can I take that as a "reviewed-by"?<br>