[Mesa-dev] [Bug 106833] glLinkProgram is expected to fail when vertex attribute aliasing happens on ES3.0 context or later

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jun 6 10:41:41 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=106833

--- Comment #3 from Tapani Pälli <lemody at gmail.com> ---
(In reply to xinghua from comment #2)
> (In reply to Tapani Pälli from comment #1)
> > 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".

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.

> 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.

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180606/99eb1f57/attachment-0001.html>


More information about the mesa-dev mailing list