BBBsmoke / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Disallow attribute aliasing for ES3 #753

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Attribute aliasing was allowed for ES2, and it was optional for a shader 
compiler to report an error if multiple ones are accessed during execution 
(ANGLE does not attempt to detect this). ES3 does not allow for aliasing under 
any circumstance.

"Binding more than one attribute name to the same location is referred to as 
aliasing, and is not permitted in OpenGL ES Shading Language 3.00 vertex
shaders. LinkProgram will fail when this condition exists. However, aliasing is 
possible in OpenGL ES Shading Language 1.00 vertex shaders." - OpenGL ES 3.0.2

Original issue reported on code.google.com by c...@chromium.org on 19 Sep 2014 at 9:44

GoogleCodeExporter commented 9 years ago
We should already disallow aliasing, Nick.

Search for "aliasing" in 

https://chromium.googlesource.com/angle/angle/+/master/src/libGLESv2/ProgramBina
ry.cpp

Original comment by jmad...@chromium.org on 19 Sep 2014 at 10:11

GoogleCodeExporter commented 9 years ago
Great!

We should also make sure we have a test for this, as it's a significant change 
in validation between ES2 and ES3 that can cause unexpected behavior. Have you 
by any chance ever come across a dEQP test for this?

Original comment by c...@chromium.org on 22 Sep 2014 at 1:38

GoogleCodeExporter commented 9 years ago
Sure, I'll add an angle test for it, that's a good suggestion. I have a test 
based on the vector/matrix test that I'll adapt.

I don't off the top of my head recall what dEQP validates for shader inputs in 
ES3, we should check.

Original comment by jmad...@chromium.org on 22 Sep 2014 at 2:08

GoogleCodeExporter commented 9 years ago
FYI, we decided to diallow aliasing for WebGL 1.0 also.

We have two conformance tests for that.

conformance/attribs/gl-bindAttribLocation-aliasing.html
conformance/attribs/gl-bindAttribLocation-matrix.html

Original comment by z...@google.com on 13 Oct 2014 at 5:26