<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - glLinkProgram is expected to fail when vertex attribute aliasing happens on ES3.0 context or later"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=106833#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - glLinkProgram is expected to fail when vertex attribute aliasing happens on ES3.0 context or later"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=106833">bug 106833</a>
              from <span class="vcard"><a class="email" href="mailto:lemody@gmail.com" title="Tapani Pälli <lemody@gmail.com>"> <span class="fn">Tapani Pälli</span></a>
</span></b>
        <pre>(In reply to xinghua from <a href="show_bug.cgi?id=106833#c2">comment #2</a>)
<span class="quote">> (In reply to Tapani Pälli from <a href="show_bug.cgi?id=106833#c1">comment #1</a>)
> > FYI I noticed this test prints out following before failing tests:
> > 
> > "Testing with shader that has entirely unused attributes".
> > 
> > IMO the issue here is that Mesa does not assign a location to entirely
> > unused attributes (their location will be -1) and therefore checks for
> > overlapping/aliasing locations are not done. I've proven this by skipping
> > opt_dead_code for certain variables in the test and that makes it pass as we
> > run the appropriate check in linker.
> > 
> > I'm not sure if this testing overlapping locations of unused attributes
> > makes actually sense or how to fix the situation.

> The  original target of these cases are surely testing with shader that has
> entirely unused attributes. These cases are used to verify whether GLES
> implementation follows the spec, and spec defines that "The existence of
> aliasing is determined by declarations present after preprocessing", "not
> depend on compiler optimizations which might be implementation-dependent".</span >

One thing making this problematic is that there are 3 ways to assign location.
Either explicitly in the shader, using glBindAttribLocation or automatic
assignment by the linker. This test calls glBindAttribLocation, so we don't
know the location aliasing after preprocessing, we will know it only at linking
phase.

However it should be possible to fix this since removing those dead variables
and assigning locations both happen in the linker, however it does not look
very straightforward :/ We do remove dead code before assigning locations since
that makes a lot of sense.

<span class="quote">> I do also know nothing why spec defines aliasing like above. Does OpenGL 4.5
> defines aliasing the same as OpenGL ES 3.0?(I had not found related
> information in OpenGL spec) And Do other OpenGL ES 3.0 implementations(intel
> or non-intel) of attribute aliasing also depend on compiler optimizations?
> Thank you.</span >

Location aliasing is permitted by desktop GL so ES 3.0 is being different here.
I don't now how other implementations do this or if they pass the test.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>