Ian Romanick <i...@freedesktop.org> writes: > On 03/24/2014 04:33 PM, Anuj Phogat wrote: >> 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. > > I made a couple comments below. > > I also have a bigger worry about this. What does the i965 backend (or > other backends) do with a shader like: > > layout(location=0) vec4 a; > layout(location=0) ivec2 b;
Depending on your VertexAttrib call type, it creates floats or ints in the vertex attribute register space. Then you'll read that float or int data as both vecs and ints in your shader.
pgpP4pGa486WU.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev