OSDN Git Service

Fix attribute layout location linking.
authorNicolas Capens <capn@google.com>
Wed, 8 Aug 2018 03:57:21 +0000 (23:57 -0400)
committerNicolas Capens <nicolascapens@google.com>
Mon, 13 Aug 2018 17:19:30 +0000 (17:19 +0000)
commit378c434627aa62e5f567b05d389c68b84a6af4fb
tree7ebb4f665198173c99d8146257785bb6764caad7
parentc47cd435bf6f631aedffa820867350c40e602c41
Fix attribute layout location linking.

When a vertex attribute has a GLSL layout location qualifier, it takes
precedence over the binding location provided through the
glBindAttribLocation API call.

OpenGL ES 3.0.5 spec:
"If an active attribute has a binding explicitly set within the shader
text and a different binding assigned by BindAttribLocation, the
assignment in the shader text is used."

Change-Id: If0bc0dc01a8ff6189703f2be26f1938fbff5f5ae
Reviewed-on: https://swiftshader-review.googlesource.com/20168
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/OpenGL/compiler/OutputASM.cpp
src/OpenGL/compiler/OutputASM.h
src/OpenGL/libGLESv2/Program.cpp
src/OpenGL/libGLESv2/Program.h
src/OpenGL/libGLESv2/libGLESv2.cpp
tests/unittests/unittests.cpp