<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 03/04/2015 05:57 PM, Ilia Mirkin
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAKb7UvjtagM1U8UbeyY=icRZG=k1mHe=SQCpSiySGp5adbTtdA@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote"><span class="sewbwzopfldlno9"></span><span
              class="sewswzgg25dnqur"></span>On Wed, Mar 4, 2015 at
            10:31 AM, Tapani <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:tapani.palli@intel.com" target="_blank">tapani.palli@intel.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <div>
                  <div class="h5">
                    <div>On 03/04/2015 05:07 PM, Ilia Mirkin wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <pre>On Wed, Mar 4, 2015 at 9:58 AM, Ilia Mirkin <a moz-do-not-send="true" href="mailto:imirkin@alum.mit.edu" target="_blank"><imirkin@alum.mit.edu></a> wrote:
</pre>
                      <blockquote type="cite">
                        <pre>On Wed, Mar 4, 2015 at 4:53 AM, Arthur Huillet <a moz-do-not-send="true" href="mailto:arthur.huillet@free.fr" target="_blank"><arthur.huillet@free.fr></a> wrote:
</pre>
                        <blockquote type="cite">
                          <pre>From: Arthur Huillet <a moz-do-not-send="true" href="mailto:ahuillet@nvidia.com" target="_blank"><ahuillet@nvidia.com></a>

Don't look up uniform names for non-zero array elements, as this is illegal per GL4.5.

>From the discussion of GetProgramResourceIndex in the GL4.5 spec:

       If name exactly matches the name string of one of the active resources for
    programInterface, the index of the matched resource is returned. Additionally, if
    name would exactly match the name string of an active resource if "[0]" were
    appended to name, the index of the matched resource is returned. Otherwise, name
    is considered not to be the name of an active resource, and INVALID_INDEX is
    returned. Note that if an interface enumerates a single active resource list entry for
    an array variable (e.g., "a[0]"), a name identifying any array element other than
    the first (e.g., "a[1]") is not considered to match.
</pre>
                        </blockquote>
                        <pre>Hm, and the spec goes on to define GetUniformIndices in terms of
GetProgramResourceIndex...

What does this say about a[3].b[75].c[2] ? Do they all have to be 0
and you have to retrieve all 3 strides? If so, your implementation
isn't quite doing that.
</pre>
                      </blockquote>
                      <pre>Also I'm having a ton of trouble parsing the meaning of

"""
Note that if an interface enumerates a single active resource list entry for
an array variable (e.g., "a[0]"), a name identifying any array element
other than
the first (e.g., "a[1]") is not considered to match.
"""

It's unclear to me that it means what you claim it means in the first
place. Ian, as the resident GL and UBO expert, care to comment? :)
</pre>
                    </blockquote>
                    <br>
                  </div>
                </div>
                IMO Arthur's interpretation is correct. I had to read
                this many many times while writing test for
                GetProgramResourceIndex to get it, the "a[1]" example
                seems misleading at first. GL_ARB_array_of_arrays is
                special case explained in GL_ARB_program_interface_query
                spec:<br>
                <br>
                "For a uniform array such as: uniform vec4 a[5][4][3];
                we enumerate twenty different entries ("a[0][0][0]"
                through "a[4][3][0]"), ..."</div>
            </blockquote>
            <div><br>
            </div>
            <div>Great, so that means that Arthur's approach should work
              fine here as well. As long as this is indeed what the spec
              is saying, the original patch is<br>
              <br>
            </div>
            <div>Reviewed-by: Ilia Mirkin <<a moz-do-not-send="true"
                href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a>><br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    me too;<br>
    <br>
    Reviewed-by: Tapani Pälli <a class="moz-txt-link-rfc2396E" href="mailto:tapani.palli@intel.com"><tapani.palli@intel.com></a><br>
    <br>
  </body>
</html>