OSDN Git Service
Fix attribute location binding
- Attribute location aliasing was allowed prior to shader
version 300, so location aliasing is now possible.
- Attribute binding refers to the linked location of attributes,
so locations set using glBindAttribLocation() will only be
returned by glGetAttribLocation() after the program is linked.
Before that, it will return the location allocated during the
previous glLinkProgram() call.
In order to do that, an extra map was added.
"linkedAttributeLocation" represents the attributes' location,
as a result of linking a program.
"attributeBinding" represents the attributes' future location,
when the next program linking occurs.
On top of that, the shader's version was not being passed down
from TranslatorASM to es2::Shader, or from es2::Shader to Program,
so this information also needed to be properly transferred.
Fixes all failures in:
dEQP-GLES3.functional.attribute_location*
Change-Id: I4ba7dc7c2f6d444e805cadeb5445f5ff371c3d95
Reviewed-on: https://swiftshader-review.googlesource.com/14568
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>