diff options
author | Ian Romanick <[email protected]> | 2011-08-17 15:38:53 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-10-04 13:17:46 -0700 |
commit | 015d4f61ef9116c9e844299ab9f2b15c653c0450 (patch) | |
tree | 34a5fb02901f83bad94e104854df8e45230e483d /src/mesa/main/shader_query.cpp | |
parent | 2fd80534f01a5c684c47eff3946f412192ae3c0b (diff) |
mesa: Add gl_shader_program::AttributeBindings
This currently mirrors the state tracking
gl_shader_program::Attributes, but I'm working towards eliminating
that.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r-- | src/mesa/main/shader_query.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index b754b1f64a1..424610d6d5a 100644 --- a/src/mesa/main/shader_query.cpp +++ b/src/mesa/main/shader_query.cpp @@ -32,6 +32,7 @@ #include "glsl_symbol_table.h" #include "ir.h" #include "shaderobj.h" +#include "program/hash_table.h" extern "C" { #include "shaderapi.h" @@ -67,6 +68,10 @@ _mesa_BindAttribLocationARB(GLhandleARB program, GLuint index, } /* this will replace the current value if it's already in the list */ + /* Add VERT_ATTRIB_GENERIC0 because that's how the linker differentiates + * between built-in attributes and user-defined attributes. + */ + shProg->AttributeBindings->put(index + VERT_ATTRIB_GENERIC0, name); i = _mesa_add_attribute(shProg->Attributes, name, size, datatype, index); if (i < 0) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindAttribLocation"); |