diff options
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r-- | mesalib/src/glsl/Android.mk | 18 | ||||
-rw-r--r-- | mesalib/src/glsl/Makefile | 16 | ||||
-rw-r--r-- | mesalib/src/glsl/Makefile.sources | 18 | ||||
-rw-r--r-- | mesalib/src/glsl/SConscript | 6 | ||||
-rw-r--r-- | mesalib/src/glsl/glsl_parser_extras.cpp | 3 | ||||
-rw-r--r-- | mesalib/src/glsl/ir_variable_refcount.cpp | 14 | ||||
-rw-r--r-- | mesalib/src/glsl/ir_variable_refcount.h | 8 | ||||
-rw-r--r-- | mesalib/src/glsl/opt_dead_code.cpp | 2 | ||||
-rw-r--r-- | mesalib/src/glsl/opt_tree_grafting.cpp | 2 |
9 files changed, 45 insertions, 42 deletions
diff --git a/mesalib/src/glsl/Android.mk b/mesalib/src/glsl/Android.mk index d7d17dd6d..754f3cced 100644 --- a/mesalib/src/glsl/Android.mk +++ b/mesalib/src/glsl/Android.mk @@ -34,9 +34,9 @@ include $(LOCAL_PATH)/Makefile.sources include $(CLEAR_VARS) LOCAL_SRC_FILES := \ - $(LIBGLCPP_SOURCES) \ - $(LIBGLSL_SOURCES) \ - $(LIBGLSL_CXX_SOURCES) + $(LIBGLCPP_FILES) \ + $(LIBGLSL_FILES) \ + $(LIBGLSL_CXX_FILES) LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/mapi \ @@ -55,11 +55,11 @@ include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_SRC_FILES := \ - $(LIBGLCPP_SOURCES) \ - $(LIBGLSL_SOURCES) \ - $(LIBGLSL_CXX_SOURCES) \ - $(BUILTIN_COMPILER_CXX_SOURCES) \ - $(GLSL_COMPILER_CXX_SOURCES) + $(LIBGLCPP_FILES) \ + $(LIBGLSL_FILES) \ + $(LIBGLSL_CXX_FILES) \ + $(BUILTIN_COMPILER_CXX_FILES) \ + $(GLSL_COMPILER_CXX_FILES) LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/mapi \ @@ -82,7 +82,7 @@ include $(BUILD_HOST_EXECUTABLE) include $(CLEAR_VARS) LOCAL_SRC_FILES := \ - $(GLSL_COMPILER_CXX_SOURCES) + $(GLSL_COMPILER_CXX_FILES) LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/mapi \ diff --git a/mesalib/src/glsl/Makefile b/mesalib/src/glsl/Makefile index d9ecbc8e3..f6c722997 100644 --- a/mesalib/src/glsl/Makefile +++ b/mesalib/src/glsl/Makefile @@ -10,20 +10,20 @@ LIBNAME = glsl include Makefile.sources GLCPP_SOURCES = \ - $(LIBGLCPP_GENERATED_SOURCES) \ - $(LIBGLCPP_SOURCES) \ + $(LIBGLCPP_GENERATED_FILES) \ + $(LIBGLCPP_FILES) \ ralloc.c \ glcpp/glcpp.c C_SOURCES = \ - $(LIBGLCPP_GENERATED_SOURCES) \ - $(LIBGLCPP_SOURCES) \ - $(LIBGLSL_SOURCES) + $(LIBGLCPP_GENERATED_FILES) \ + $(LIBGLCPP_FILES) \ + $(LIBGLSL_FILES) # common sources for builtin_compiler and libglsl CXX_SOURCES = \ - $(BUILTIN_COMPILER_GENERATED_CXX_SOURCES) \ - $(LIBGLSL_CXX_SOURCES) + $(BUILTIN_COMPILER_GENERATED_CXX_FILES) \ + $(LIBGLSL_CXX_FILES) LIBS = \ $(TOP)/src/glsl/libglsl.a @@ -34,7 +34,7 @@ GLSL2_C_SOURCES = \ ../mesa/program/hash_table.c \ ../mesa/program/symbol_table.c GLSL2_CXX_SOURCES = \ - $(GLSL_COMPILER_CXX_SOURCES) + $(GLSL_COMPILER_CXX_FILES) GLSL2_OBJECTS = \ $(GLSL2_C_SOURCES:.c=.o) \ diff --git a/mesalib/src/glsl/Makefile.sources b/mesalib/src/glsl/Makefile.sources index 5e80af297..06728daf7 100644 --- a/mesalib/src/glsl/Makefile.sources +++ b/mesalib/src/glsl/Makefile.sources @@ -2,20 +2,20 @@ # libglcpp -LIBGLCPP_SOURCES := \ +LIBGLCPP_FILES := \ glcpp/pp.c -LIBGLCPP_GENERATED_SOURCES := \ +LIBGLCPP_GENERATED_FILES := \ glcpp/glcpp-lex.c \ glcpp/glcpp-parse.c # libglsl -LIBGLSL_SOURCES := \ +LIBGLSL_FILES := \ strtod.c \ ralloc.c -LIBGLSL_CXX_SOURCES := \ +LIBGLSL_CXX_FILES := \ ast_expr.cpp \ ast_function.cpp \ ast_to_hir.cpp \ @@ -82,7 +82,7 @@ LIBGLSL_CXX_SOURCES := \ # glsl_compiler -GLSL_COMPILER_CXX_SOURCES := \ +GLSL_COMPILER_CXX_FILES := \ standalone_scaffolding.cpp \ main.cpp @@ -92,14 +92,14 @@ GLSL_COMPILER_CXX_SOURCES := \ # For this to work, a dummy version of builtin_function.cpp, # builtin_stubs.cpp, is used. -BUILTIN_COMPILER_CXX_SOURCES := \ +BUILTIN_COMPILER_CXX_FILES := \ builtin_stubs.cpp -BUILTIN_COMPILER_GENERATED_CXX_SOURCES := \ +BUILTIN_COMPILER_GENERATED_CXX_FILES := \ glsl_lexer.cpp \ glsl_parser.cpp # libglsl generated sources -LIBGLSL_GENERATED_CXX_SOURCES := \ - $(BUILTIN_COMPILER_GENERATED_CXX_SOURCES) \ +LIBGLSL_GENERATED_CXX_FILES := \ + $(BUILTIN_COMPILER_GENERATED_CXX_FILES) \ builtin_function.cpp diff --git a/mesalib/src/glsl/SConscript b/mesalib/src/glsl/SConscript index b8154d608..f8e872368 100644 --- a/mesalib/src/glsl/SConscript +++ b/mesalib/src/glsl/SConscript @@ -42,7 +42,7 @@ glsl_sources = [ source_lists = env.ParseSourceList('Makefile.sources') # add non-generated sources -for l in ('LIBGLCPP_SOURCES', 'LIBGLSL_SOURCES', 'LIBGLSL_CXX_SOURCES'): +for l in ('LIBGLCPP_FILES', 'LIBGLSL_FILES', 'LIBGLSL_CXX_FILES'): glsl_sources += source_lists[l] if env['msvc']: @@ -57,7 +57,7 @@ else: env.Command('hash_table.c', '#src/mesa/program/hash_table.c', Copy('$TARGET', '$SOURCE')) env.Command('symbol_table.c', '#src/mesa/program/symbol_table.c', Copy('$TARGET', '$SOURCE')) - compiler_objs = env.StaticObject(source_lists['GLSL_COMPILER_CXX_SOURCES']) + compiler_objs = env.StaticObject(source_lists['GLSL_COMPILER_CXX_FILES']) mesa_objs = env.StaticObject([ 'hash_table.c', @@ -69,7 +69,7 @@ else: builtin_compiler = env.Program( target = 'builtin_compiler', source = compiler_objs + glsl_sources + \ - source_lists['BUILTIN_COMPILER_CXX_SOURCES'], + source_lists['BUILTIN_COMPILER_CXX_FILES'], ) # SCons builtin dependency scanner doesn't detect that glsl_lexer.ll diff --git a/mesalib/src/glsl/glsl_parser_extras.cpp b/mesalib/src/glsl/glsl_parser_extras.cpp index 0b53232e9..7f8d47ce9 100644 --- a/mesalib/src/glsl/glsl_parser_extras.cpp +++ b/mesalib/src/glsl/glsl_parser_extras.cpp @@ -114,6 +114,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx, } this->supported_version_string = supported; + + if (ctx->Const.ForceGLSLExtensionsWarn) + _mesa_glsl_process_extension("all", NULL, "warn", NULL, this); } const char * diff --git a/mesalib/src/glsl/ir_variable_refcount.cpp b/mesalib/src/glsl/ir_variable_refcount.cpp index 7d39abb36..1633a7357 100644 --- a/mesalib/src/glsl/ir_variable_refcount.cpp +++ b/mesalib/src/glsl/ir_variable_refcount.cpp @@ -36,7 +36,7 @@ // constructor -variable_entry::variable_entry(ir_variable *var) +ir_variable_refcount_entry::ir_variable_refcount_entry(ir_variable *var) { this->var = var; assign = NULL; @@ -46,17 +46,17 @@ variable_entry::variable_entry(ir_variable *var) } -variable_entry * +ir_variable_refcount_entry * ir_variable_refcount_visitor::get_variable_entry(ir_variable *var) { assert(var); foreach_iter(exec_list_iterator, iter, this->variable_list) { - variable_entry *entry = (variable_entry *)iter.get(); + ir_variable_refcount_entry *entry = (ir_variable_refcount_entry *)iter.get(); if (entry->var == var) return entry; } - variable_entry *entry = new(mem_ctx) variable_entry(var); + ir_variable_refcount_entry *entry = new(mem_ctx) ir_variable_refcount_entry(var); assert(entry->referenced_count == 0); this->variable_list.push_tail(entry); return entry; @@ -66,7 +66,7 @@ ir_variable_refcount_visitor::get_variable_entry(ir_variable *var) ir_visitor_status ir_variable_refcount_visitor::visit(ir_variable *ir) { - variable_entry *entry = this->get_variable_entry(ir); + ir_variable_refcount_entry *entry = this->get_variable_entry(ir); if (entry) entry->declaration = true; @@ -78,7 +78,7 @@ ir_visitor_status ir_variable_refcount_visitor::visit(ir_dereference_variable *ir) { ir_variable *const var = ir->variable_referenced(); - variable_entry *entry = this->get_variable_entry(var); + ir_variable_refcount_entry *entry = this->get_variable_entry(var); if (entry) entry->referenced_count++; @@ -101,7 +101,7 @@ ir_variable_refcount_visitor::visit_enter(ir_function_signature *ir) ir_visitor_status ir_variable_refcount_visitor::visit_leave(ir_assignment *ir) { - variable_entry *entry; + ir_variable_refcount_entry *entry; entry = this->get_variable_entry(ir->lhs->variable_referenced()); if (entry) { entry->assigned_count++; diff --git a/mesalib/src/glsl/ir_variable_refcount.h b/mesalib/src/glsl/ir_variable_refcount.h index 906135a9e..51a4945a1 100644 --- a/mesalib/src/glsl/ir_variable_refcount.h +++ b/mesalib/src/glsl/ir_variable_refcount.h @@ -33,10 +33,10 @@ #include "ir_visitor.h" #include "glsl_types.h" -class variable_entry : public exec_node +class ir_variable_refcount_entry : public exec_node { public: - variable_entry(ir_variable *var); + ir_variable_refcount_entry(ir_variable *var); ir_variable *var; /* The key: the variable's pointer. */ ir_assignment *assign; /* An assignment to the variable, if any */ @@ -69,9 +69,9 @@ public: virtual ir_visitor_status visit_enter(ir_function_signature *); virtual ir_visitor_status visit_leave(ir_assignment *); - variable_entry *get_variable_entry(ir_variable *var); + ir_variable_refcount_entry *get_variable_entry(ir_variable *var); - /* List of variable_entry */ + /* List of ir_variable_refcount_entry */ exec_list variable_list; void *mem_ctx; diff --git a/mesalib/src/glsl/opt_dead_code.cpp b/mesalib/src/glsl/opt_dead_code.cpp index 5b9546ad4..22c7af1c2 100644 --- a/mesalib/src/glsl/opt_dead_code.cpp +++ b/mesalib/src/glsl/opt_dead_code.cpp @@ -50,7 +50,7 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned) v.run(instructions); foreach_iter(exec_list_iterator, iter, v.variable_list) { - variable_entry *entry = (variable_entry *)iter.get(); + ir_variable_refcount_entry *entry = (ir_variable_refcount_entry *)iter.get(); /* Since each assignment is a reference, the refereneced count must be * greater than or equal to the assignment count. If they are equal, diff --git a/mesalib/src/glsl/opt_tree_grafting.cpp b/mesalib/src/glsl/opt_tree_grafting.cpp index d32d14e88..e2aff5f80 100644 --- a/mesalib/src/glsl/opt_tree_grafting.cpp +++ b/mesalib/src/glsl/opt_tree_grafting.cpp @@ -349,7 +349,7 @@ tree_grafting_basic_block(ir_instruction *bb_first, lhs_var->mode == ir_var_inout) continue; - variable_entry *entry = info->refs->get_variable_entry(lhs_var); + ir_variable_refcount_entry *entry = info->refs->get_variable_entry(lhs_var); if (!entry->declaration || entry->assigned_count != 1 || |