gen_sampler_type "3D" "GLSL_SAMPLER_DIM_3D" 0 0 "GLSL_TYPE_FLOAT"
gen_sampler_type "Cube" "GLSL_SAMPLER_DIM_CUBE" 0 0 "GLSL_TYPE_FLOAT"
-gen_sampler_type "2DRect" "GLSL_SAMPLER_DIM_RECT" 0 0 "GLSL_TYPE_FLOAT"
-gen_sampler_type "2DRect" "GLSL_SAMPLER_DIM_RECT" 1 0 "GLSL_TYPE_FLOAT"
gen_footer
echo '/*@}*/'
echo
+echo '/** \name Sampler types added by GL_ARB_texture_rectangle'
+echo ' */'
+echo '/*@{*/'
+gen_header "ARB_texture_rectangle"
+gen_sampler_type "2DRect" "GLSL_SAMPLER_DIM_RECT" 0 0 "GLSL_TYPE_FLOAT"
+gen_sampler_type "2DRect" "GLSL_SAMPLER_DIM_RECT" 1 0 "GLSL_TYPE_FLOAT"
+gen_footer
+echo '/*@}*/'
+
+echo
echo '/** \name Sampler types added by GL_EXT_texture_buffer_object'
echo ' */'
echo '/*@{*/'
state->ARB_draw_buffers_enable = (ext_mode != extension_disable);
state->ARB_draw_buffers_warn = (ext_mode == extension_warn);
}
+ } if (strcmp(name, "GL_ARB_texture_rectangle") == 0) {
+ state->ARB_texture_rectangle_enable = (ext_mode != extension_disable);
+ state->ARB_texture_rectangle_warn = (ext_mode == extension_warn);
} else {
unsupported = true;
}
state.error = false;
state.temp_index = 0;
state.loop_or_switch_nesting = NULL;
+ state.ARB_texture_rectangle_enable = true;
_mesa_glsl_lexer_ctor(& state, shader, shader_len);
_mesa_glsl_parse(& state);
static void
add_types_to_symbol_table(glsl_symbol_table *symtab,
const struct glsl_type *types,
- unsigned num_types)
+ unsigned num_types, bool warn)
{
- unsigned i;
+ (void) warn;
- for (i = 0; i < num_types; i++) {
+ for (unsigned i = 0; i < num_types; i++) {
symtab->add_type(types[i].name, & types[i]);
}
}
generate_110_types(glsl_symbol_table *symtab)
{
add_types_to_symbol_table(symtab, builtin_core_types,
- Elements(builtin_core_types));
+ Elements(builtin_core_types),
+ false);
add_types_to_symbol_table(symtab, builtin_structure_types,
- Elements(builtin_structure_types));
+ Elements(builtin_structure_types),
+ false);
add_types_to_symbol_table(symtab, builtin_110_deprecated_structure_types,
- Elements(builtin_110_deprecated_structure_types));
- add_types_to_symbol_table(symtab, & void_type, 1);
+ Elements(builtin_110_deprecated_structure_types),
+ false);
+ add_types_to_symbol_table(symtab, & void_type, 1, false);
}
generate_110_types(symtab);
add_types_to_symbol_table(symtab, builtin_120_types,
- Elements(builtin_120_types));
+ Elements(builtin_120_types), false);
}
generate_120_types(symtab);
add_types_to_symbol_table(symtab, builtin_130_types,
- Elements(builtin_130_types));
+ Elements(builtin_130_types), false);
+}
+
+
+static void
+generate_ARB_texture_rectangle_types(glsl_symbol_table *symtab, bool warn)
+{
+ add_types_to_symbol_table(symtab, builtin_ARB_texture_rectangle_types,
+ Elements(builtin_ARB_texture_rectangle_types),
+ warn);
}
/* error */
break;
}
+
+ if (state->ARB_texture_rectangle_enable) {
+ generate_ARB_texture_rectangle_types(state->symbols,
+ state->ARB_texture_rectangle_warn);
+ }
}