<p dir="ltr">Fwiw I remember having trouble finding justification for the comments in that issue, and iirc the opposite seemed to be indicated by the spec text. (E.g.that array indices should be maintained.) I suspect there are also AoA interactions.</p>
<p dir="ltr">I guess my point here is to double check this, as well as what other drivers do in this and similar situations.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Aug 1, 2016 12:31 PM, "Kenneth Graunke" <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Issue 16 of the ARB_program_interface_query spec gives an example:<br>
<br>
For example, in the following code:<br>
<br>
uniform Block1 {<br>
int member1;<br>
};<br>
uniform Block2 {<br>
int member2;<br>
} instance2;<br>
uniform Block3 {<br>
int member3;<br>
} instance3[2]; // uses two separate buffer bindings<br>
<br>
the three uniforms (if active) are enumerated as "member1",<br>
"Block2.member2", and "Block3.member3".<br>
<br>
>From this it's pretty clear that the array index should not be included.<br>
<br>
Cc: <a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a><br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
src/compiler/glsl/linker.cpp | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp<br>
index 6d45a02..bf11cb4 100644<br>
--- a/src/compiler/glsl/linker.cpp<br>
+++ b/src/compiler/glsl/linker.cpp<br>
@@ -3800,7 +3800,8 @@ add_shader_variable(struct gl_shader_program *shProg, unsigned stage_mask,<br>
*/<br>
const char *prefixed_name = (var->data.from_named_ifc_block &&<br>
!is_gl_identifier(var->name))<br>
- ? ralloc_asprintf(shProg, "%s.%s", var->get_interface_type()->name,<br>
+ ? ralloc_asprintf(shProg, "%s.%s",<br>
+ var->get_interface_type()->without_array()->name,<br>
name)<br>
: name;<br>
<font color="#888888"><br>
--<br>
2.9.2<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></blockquote></div><br></div>