Ignore this. Ian sent a better patch at the same time.<br><br><div class="gmail_quote">On Mon, Jan 28, 2013 at 4:18 PM, Frank Henigman <span dir="ltr"><<a href="mailto:fjhenigman@google.com" target="_blank">fjhenigman@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Make glsl-uniform-out-of-bounds-2 work whether or not array names<br>
that come out of glGetActiveUniform() have a "[0]" at the end.<br>
<br>
<a href="https://bugs.freedesktop.org/show_bug.cgi?id=59688" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=59688</a><br>
<br>
Signed-off-by: Frank Henigman <<a href="mailto:fjhenigman@google.com" target="_blank">fjhenigman@google.com</a>><br>
---<br>
tests/shaders/glsl-uniform-out-of-bounds-2.c | 9 +++++----<br>
1 file changed, 5 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/tests/shaders/glsl-uniform-out-of-bounds-2.c b/tests/shaders/glsl-uniform-out-of-bounds-2.c<br>
index db46a1e..2ad992b 100644<br>
--- a/tests/shaders/glsl-uniform-out-of-bounds-2.c<br>
+++ b/tests/shaders/glsl-uniform-out-of-bounds-2.c<br>
@@ -83,17 +83,18 @@ piglit_init(int argc, char **argv)<br>
glGetActiveUniform(prog, k, ARRAY_SIZE(name), NULL,<br>
&num_active_elements,<br>
&type, name);<br>
- if (!((name[0] == 'v' || name[0] == 'm') && name[1] == 0))<br>
+ if (!((name[0] == 'v' || name[0] == 'm')<br>
+ && (name[1] == 0 || name[1] == '[')))<br>
continue;<br>
- printf("array '%s' active elements %d\n",<br>
- name, num_active_elements);<br>
+ printf("array '%c' active elements %d\n",<br>
+ name[0], num_active_elements);<br>
<br>
/* for each index in array, plus some before and after */<br>
for (i = -2; i < 6; ++i) {<br>
bool is_active = 0 <= i && i < num_active_elements;<br>
GLchar element[9];<br>
GLint loc;<br>
- sprintf(element, "%s[%d]", name, i);<br>
+ sprintf(element, "%c[%d]", name[0], i);<br>
loc = glGetUniformLocation(prog, element);<br>
<br>
/* does glGetUniformLocation agree with<br>
<span><font color="#888888">--<br>
1.8.1<br>
<br>
</font></span></blockquote></div><br>