diff options
author | Anuj Phogat <[email protected]> | 2014-03-04 17:03:28 -0800 |
---|---|---|
committer | Anuj Phogat <[email protected]> | 2014-05-01 10:58:39 -0700 |
commit | 8c61b6a99b221439a8109c5a5cd03b7bf065d373 (patch) | |
tree | facfb6d019a8435ba8b98b5e21cf857bcb72171e /src/mesa | |
parent | a773fdc64da8ba88d8c7f8e383c45248b0c3aa19 (diff) |
glsl: Allow overlapping locations for vertex input attributes
Currently overlapping locations of input variables are not allowed for all
the shader types in OpenGL and OpenGL ES.
From OpenGL ES 3.0 spec, page 56:
"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."
Taking in to account what different versions of OpenGL and OpenGL ES specs
say about aliasing:
- It is allowed only on vertex shader input attributes in OpenGL (2.0 and
above) and OpenGL ES 2.0.
- It is explictly disallowed in OpenGL ES 3.0.
Fixes Khronos CTS failing test:
explicit_attrib_location_vertex_input_aliased.test
See more details about this at below mentioned khronos bug.
V2: Fix the case where location exceeds the maximum allowed attribute
location.
V3: Simplify the condition added in V2.
Signed-off-by: Anuj Phogat <[email protected]>
Cc: "9.2 10.0 10.1" <[email protected]>
Bugzilla: Khronos #9609
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
0 files changed, 0 insertions, 0 deletions