summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/builtin_variables.cpp5
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp1
-rw-r--r--src/compiler/glsl/glsl_parser_extras.h2
3 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp
index e305ab9b9b8..c9fdac84666 100644
--- a/src/compiler/glsl/builtin_variables.cpp
+++ b/src/compiler/glsl/builtin_variables.cpp
@@ -1084,8 +1084,13 @@ builtin_variable_generator::generate_vs_special_vars()
add_system_value(SYSTEM_VALUE_BASE_INSTANCE, int_t, "gl_BaseInstance");
add_system_value(SYSTEM_VALUE_DRAW_ID, int_t, "gl_DrawID");
}
+ if (state->EXT_draw_instanced_enable && state->is_version(0, 100))
+ add_system_value(SYSTEM_VALUE_INSTANCE_ID, int_t, GLSL_PRECISION_HIGH,
+ "gl_InstanceIDEXT");
+
if (state->ARB_draw_instanced_enable)
add_system_value(SYSTEM_VALUE_INSTANCE_ID, int_t, "gl_InstanceIDARB");
+
if (state->ARB_draw_instanced_enable || state->is_version(140, 300) ||
state->EXT_gpu_shader4_enable) {
add_system_value(SYSTEM_VALUE_INSTANCE_ID, int_t, GLSL_PRECISION_HIGH,
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 6eb0aa2abb8..c394f00480a 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -721,6 +721,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(EXT_demote_to_helper_invocation),
EXT(EXT_frag_depth),
EXT(EXT_draw_buffers),
+ EXT(EXT_draw_instanced),
EXT(EXT_clip_cull_distance),
EXT(EXT_geometry_point_size),
EXT_AEP(EXT_geometry_shader),
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index b5e687d6038..afbc09170bf 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -824,6 +824,8 @@ struct _mesa_glsl_parse_state {
bool EXT_demote_to_helper_invocation_warn;
bool EXT_draw_buffers_enable;
bool EXT_draw_buffers_warn;
+ bool EXT_draw_instanced_enable;
+ bool EXT_draw_instanced_warn;
bool EXT_frag_depth_enable;
bool EXT_frag_depth_warn;
bool EXT_geometry_point_size_enable;