From: Eric Anholt Date: Thu, 15 Mar 2012 16:29:47 +0000 (-0700) Subject: glsl: Don't include the deprecated structure types in GLSL 1.40. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0225a15b6907b51dbbc9602a1f0cb07ee809f496;p=mesa.git glsl: Don't include the deprecated structure types in GLSL 1.40. Reviewed-by: Kenneth Graunke --- diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp index 4baec4195f9..069ebd10d6c 100644 --- a/src/glsl/glsl_types.cpp +++ b/src/glsl/glsl_types.cpp @@ -169,7 +169,7 @@ glsl_type::generate_100ES_types(glsl_symbol_table *symtab) } void -glsl_type::generate_110_types(glsl_symbol_table *symtab) +glsl_type::generate_110_types(glsl_symbol_table *symtab, bool add_deprecated) { generate_100ES_types(symtab); @@ -177,16 +177,18 @@ glsl_type::generate_110_types(glsl_symbol_table *symtab) Elements(builtin_110_types), false); add_types_to_symbol_table(symtab, &_sampler3D_type, 1, false); - add_types_to_symbol_table(symtab, builtin_110_deprecated_structure_types, - Elements(builtin_110_deprecated_structure_types), - false); + if (add_deprecated) { + add_types_to_symbol_table(symtab, builtin_110_deprecated_structure_types, + Elements(builtin_110_deprecated_structure_types), + false); + } } void -glsl_type::generate_120_types(glsl_symbol_table *symtab) +glsl_type::generate_120_types(glsl_symbol_table *symtab, bool add_deprecated) { - generate_110_types(symtab); + generate_110_types(symtab, add_deprecated); add_types_to_symbol_table(symtab, builtin_120_types, Elements(builtin_120_types), false); @@ -194,9 +196,9 @@ glsl_type::generate_120_types(glsl_symbol_table *symtab) void -glsl_type::generate_130_types(glsl_symbol_table *symtab) +glsl_type::generate_130_types(glsl_symbol_table *symtab, bool add_deprecated) { - generate_120_types(symtab); + generate_120_types(symtab, add_deprecated); add_types_to_symbol_table(symtab, builtin_130_types, Elements(builtin_130_types), false); @@ -207,7 +209,7 @@ glsl_type::generate_130_types(glsl_symbol_table *symtab) void glsl_type::generate_140_types(glsl_symbol_table *symtab) { - generate_130_types(symtab); + generate_130_types(symtab, false); add_types_to_symbol_table(symtab, builtin_140_types, Elements(builtin_140_types), false); @@ -259,13 +261,13 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state) glsl_type::generate_100ES_types(state->symbols); break; case 110: - glsl_type::generate_110_types(state->symbols); + glsl_type::generate_110_types(state->symbols, true); break; case 120: - glsl_type::generate_120_types(state->symbols); + glsl_type::generate_120_types(state->symbols, true); break; case 130: - glsl_type::generate_130_types(state->symbols); + glsl_type::generate_130_types(state->symbols, true); break; case 140: glsl_type::generate_140_types(state->symbols); diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index 8f2a3ff38ca..48d41d7f8e6 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -515,9 +515,9 @@ private: */ /*@{*/ static void generate_100ES_types(glsl_symbol_table *); - static void generate_110_types(glsl_symbol_table *); - static void generate_120_types(glsl_symbol_table *); - static void generate_130_types(glsl_symbol_table *); + static void generate_110_types(glsl_symbol_table *, bool add_deprecated); + static void generate_120_types(glsl_symbol_table *, bool add_deprecated); + static void generate_130_types(glsl_symbol_table *, bool add_deprecated); static void generate_140_types(glsl_symbol_table *); static void generate_ARB_texture_rectangle_types(glsl_symbol_table *, bool); static void generate_EXT_texture_array_types(glsl_symbol_table *, bool);