From ffe218bbb0ffa6d2a7f7cbf6b1f81797e667183a Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 5 Mar 2012 09:59:38 +0100 Subject: libfontenc xserver pixman mesa git update 5 Mar 2012 font-util-1.3.0 xclock-1.0.6 libXfont-1.4.5 inputproto-2.2 --- mesalib/src/glsl/builtin_variables.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'mesalib/src/glsl') 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"; } } -- cgit v1.2.3