aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-05 10:23:14 +0100
committermarha <marha@users.sourceforge.net>2012-03-05 10:23:14 +0100
commit8db4c7567d495ef6f6162406394ac192e6c2cfe7 (patch)
tree9d8233b2f54ad198da3354aa9dbd8d0082156a9c /mesalib/src/glsl/builtin_variables.cpp
parentc14f2432d6bfb3de6c6289efd0471f038a289327 (diff)
parent50ace52bb8308fd62b8bad9ae912dc18c4ae32ff (diff)
downloadvcxsrv-8db4c7567d495ef6f6162406394ac192e6c2cfe7.tar.gz
vcxsrv-8db4c7567d495ef6f6162406394ac192e6c2cfe7.tar.bz2
vcxsrv-8db4c7567d495ef6f6162406394ac192e6c2cfe7.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl/builtin_variables.cpp')
-rw-r--r--mesalib/src/glsl/builtin_variables.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/mesalib/src/glsl/builtin_variables.cpp b/mesalib/src/glsl/builtin_variables.cpp
index ed6b922ca..66b3abdd8 100644
--- a/mesalib/src/glsl/builtin_variables.cpp
+++ b/mesalib/src/glsl/builtin_variables.cpp
@@ -870,13 +870,25 @@ generate_ARB_draw_instanced_variables(exec_list *instructions,
/* gl_InstanceIDARB is only available in the vertex shader.
*/
if (target == vertex_shader) {
- ir_variable *const inst =
+ ir_variable *inst =
add_variable(instructions, state->symbols,
"gl_InstanceIDARB", glsl_type::int_type,
ir_var_system_value, SYSTEM_VALUE_INSTANCE_ID);
if (warn)
inst->warn_extension = "GL_ARB_draw_instanced";
+
+ /* Originally ARB_draw_instanced only specified that ARB decorated name.
+ * Since no vendor actually implemented that behavior and some apps use
+ * the undecorated name, the extension now specifies that both names are
+ * available.
+ */
+ inst = add_variable(instructions, state->symbols,
+ "gl_InstanceID", glsl_type::int_type,
+ ir_var_system_value, SYSTEM_VALUE_INSTANCE_ID);
+
+ if (warn)
+ inst->warn_extension = "GL_ARB_draw_instanced";
}
}