aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-12 08:30:03 +0200
committermarha <marha@users.sourceforge.net>2012-06-12 08:30:03 +0200
commit925b68a7b26823fdfa1cb25d3edc3545fc2175b1 (patch)
tree57c1e15fcc492bdc9b9cfd195e552c69aba845ce /mesalib/src/glsl
parent567cbd4acc1e35ae40d99b24bb321d97632399db (diff)
downloadvcxsrv-925b68a7b26823fdfa1cb25d3edc3545fc2175b1.tar.gz
vcxsrv-925b68a7b26823fdfa1cb25d3edc3545fc2175b1.tar.bz2
vcxsrv-925b68a7b26823fdfa1cb25d3edc3545fc2175b1.zip
fontconfig mesa pixman git update 12 Juni 2012
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r--mesalib/src/glsl/Android.mk1
-rw-r--r--mesalib/src/glsl/Makefile36
-rw-r--r--mesalib/src/glsl/Makefile.sources174
-rw-r--r--mesalib/src/glsl/opt_algebraic.cpp4
-rw-r--r--mesalib/src/glsl/opt_constant_folding.cpp4
-rw-r--r--mesalib/src/glsl/opt_constant_propagation.cpp4
-rw-r--r--mesalib/src/glsl/opt_constant_variable.cpp4
-rw-r--r--mesalib/src/glsl/opt_copy_propagation.cpp4
-rw-r--r--mesalib/src/glsl/opt_copy_propagation_elements.cpp4
-rw-r--r--mesalib/src/glsl/opt_dead_code_local.cpp3
-rw-r--r--mesalib/src/glsl/opt_dead_functions.cpp3
-rw-r--r--mesalib/src/glsl/opt_function_inlining.cpp3
-rw-r--r--mesalib/src/glsl/opt_if_simplification.cpp4
-rw-r--r--mesalib/src/glsl/opt_noop_swizzle.cpp4
-rw-r--r--mesalib/src/glsl/opt_redundant_jumps.cpp4
-rw-r--r--mesalib/src/glsl/opt_structure_splitting.cpp4
-rw-r--r--mesalib/src/glsl/opt_swizzle_swizzle.cpp4
-rw-r--r--mesalib/src/glsl/opt_tree_grafting.cpp4
18 files changed, 150 insertions, 118 deletions
diff --git a/mesalib/src/glsl/Android.mk b/mesalib/src/glsl/Android.mk
index cf793d65e..66c8bec32 100644
--- a/mesalib/src/glsl/Android.mk
+++ b/mesalib/src/glsl/Android.mk
@@ -25,6 +25,7 @@
LOCAL_PATH := $(call my-dir)
+GLSL_SRCDIR = .
include $(LOCAL_PATH)/Makefile.sources
# ---------------------------------------
diff --git a/mesalib/src/glsl/Makefile b/mesalib/src/glsl/Makefile
index 7c80c95d8..3cf9fc962 100644
--- a/mesalib/src/glsl/Makefile
+++ b/mesalib/src/glsl/Makefile
@@ -7,6 +7,7 @@ include $(TOP)/configs/current
LIBNAME = glsl
+GLSL_SRCDIR=.
include Makefile.sources
GLCPP_SOURCES = \
@@ -67,9 +68,6 @@ OBJECTS = \
$(C_SOURCES:.c=.o) \
$(CXX_SOURCES:.cpp=.o)
-DRICORE_OBJ_DIR = obj-visible
-OBJECTS_DRICORE = $(addprefix $(DRICORE_OBJ_DIR)/,$(OBJECTS))
-
INCLUDES = \
-I. \
-I../mesa \
@@ -87,13 +85,7 @@ ALL_SOURCES = \
##### TARGETS #####
-default: depend lib$(LIBNAME).a $(APPS) $(DRICORE_GLSL_LIBS)
-
-$(TOP)/$(LIB_DIR)/libglsl.so: $(OBJECTS_DRICORE) builtin_function.o Makefile $(TOP)/src/glsl/Makefile.template
- $(MKLIB) -o $@ -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
- -cplusplus -noprefix \
- -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/$@.dylib \
- $(OBJECTS_DRICORE) builtin_function.o
+default: depend lib$(LIBNAME).a $(APPS)
lib$(LIBNAME).a: $(OBJECTS) builtin_function.o Makefile $(TOP)/src/glsl/Makefile.template
$(MKLIB) -cplusplus -o $(LIBNAME) -static $(OBJECTS) builtin_function.o
@@ -102,28 +94,16 @@ depend: $(ALL_SOURCES) Makefile
rm -f depend
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(ALL_SOURCES) 2> /dev/null
- $(MKDEP) $(MKDEP_OPTIONS) -a -p $(DRICORE_OBJ_DIR)/ $(INCLUDES) $(ALL_SOURCES) 2> /dev/null
# Remove .o and backup files
-clean: clean-dricore
+clean:
rm -f $(GLCPP_OBJECTS) $(GLSL2_OBJECTS) $(TEST_OBJECTS) $(OBJECTS) lib$(LIBNAME).a depend depend.bak builtin_function.cpp builtin_function.o builtin_stubs.o builtin_compiler
-rm -f $(APPS)
-clean-dricore:
- -rm -f $(OBJECTS_DRICORE) $(TOP)/$(LIB_DIR)/libglsl.so libglsl.so
-
-ifneq (,$(DRICORE_GLSL_LIBS))
-DRICORE_INSTALL_TARGET = install-dricore
-endif
-
# Dummy target
-install: $(DRICORE_INSTALL_TARGET)
+install:
@echo -n ""
-install-dricore: default
- $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
- $(INSTALL) -m 755 $(DRICORE_GLSL_LIBS) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
-
##### RULES #####
glsl_compiler: $(GLSL2_OBJECTS) libglsl.a
@@ -142,14 +122,6 @@ glcpp/glcpp: $(GLCPP_OBJECTS)
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
-$(DRICORE_OBJ_DIR)/%.o : %.cpp
- @mkdir -p $(dir $@)
- $(CXX) -c $(INCLUDES) $(DRI_CXXFLAGS) $(DEFINES) $< -o $@
-
-$(DRICORE_OBJ_DIR)/%.o : %.c
- @mkdir -p $(dir $@)
- $(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DEFINES) $< -o $@
-
glsl_lexer.cpp: glsl_lexer.ll
$(FLEX) --nounistd -o$@ $<
diff --git a/mesalib/src/glsl/Makefile.sources b/mesalib/src/glsl/Makefile.sources
index caa8ad590..0425fa33e 100644
--- a/mesalib/src/glsl/Makefile.sources
+++ b/mesalib/src/glsl/Makefile.sources
@@ -1,93 +1,95 @@
# shared source lists for Makefile, SConscript, and Android.mk
+GLSL_SRCDIR ?= .
+
# libglcpp
-LIBGLCPP_FILES := \
- glcpp/pp.c
+LIBGLCPP_FILES = \
+ $(GLSL_SRCDIR)/glcpp/pp.c
-LIBGLCPP_GENERATED_FILES := \
- glcpp/glcpp-lex.c \
- glcpp/glcpp-parse.c
+LIBGLCPP_GENERATED_FILES = \
+ $(GLSL_SRCDIR)/glcpp/glcpp-lex.c \
+ $(GLSL_SRCDIR)/glcpp/glcpp-parse.c
# libglsl
-LIBGLSL_FILES := \
- strtod.c \
- ralloc.c
+LIBGLSL_FILES = \
+ $(GLSL_SRCDIR)/strtod.c \
+ $(GLSL_SRCDIR)/ralloc.c
-LIBGLSL_CXX_FILES := \
- ast_expr.cpp \
- ast_function.cpp \
- ast_to_hir.cpp \
- ast_type.cpp \
- builtin_variables.cpp \
- glsl_parser_extras.cpp \
- glsl_types.cpp \
- glsl_symbol_table.cpp \
- hir_field_selection.cpp \
- ir_basic_block.cpp \
- ir_builder.cpp \
- ir_clone.cpp \
- ir_constant_expression.cpp \
- ir.cpp \
- ir_expression_flattening.cpp \
- ir_function_can_inline.cpp \
- ir_function_detect_recursion.cpp \
- ir_function.cpp \
- ir_hierarchical_visitor.cpp \
- ir_hv_accept.cpp \
- ir_import_prototypes.cpp \
- ir_print_visitor.cpp \
- ir_reader.cpp \
- ir_rvalue_visitor.cpp \
- ir_set_program_inouts.cpp \
- ir_validate.cpp \
- ir_variable_refcount.cpp \
- linker.cpp \
- link_functions.cpp \
- link_uniforms.cpp \
- link_uniform_initializers.cpp \
- loop_analysis.cpp \
- loop_controls.cpp \
- loop_unroll.cpp \
- lower_clip_distance.cpp \
- lower_discard.cpp \
- lower_discard_flow.cpp \
- lower_if_to_cond_assign.cpp \
- lower_instructions.cpp \
- lower_jumps.cpp \
- lower_mat_op_to_vec.cpp \
- lower_noise.cpp \
- lower_texture_projection.cpp \
- lower_variable_index_to_cond_assign.cpp \
- lower_vec_index_to_cond_assign.cpp \
- lower_vec_index_to_swizzle.cpp \
- lower_vector.cpp \
- lower_output_reads.cpp \
- opt_algebraic.cpp \
- opt_array_splitting.cpp \
- opt_constant_folding.cpp \
- opt_constant_propagation.cpp \
- opt_constant_variable.cpp \
- opt_copy_propagation.cpp \
- opt_copy_propagation_elements.cpp \
- opt_dead_code.cpp \
- opt_dead_code_local.cpp \
- opt_dead_functions.cpp \
- opt_function_inlining.cpp \
- opt_if_simplification.cpp \
- opt_noop_swizzle.cpp \
- opt_redundant_jumps.cpp \
- opt_structure_splitting.cpp \
- opt_swizzle_swizzle.cpp \
- opt_tree_grafting.cpp \
- s_expression.cpp
+LIBGLSL_CXX_FILES = \
+ $(GLSL_SRCDIR)/ast_expr.cpp \
+ $(GLSL_SRCDIR)/ast_function.cpp \
+ $(GLSL_SRCDIR)/ast_to_hir.cpp \
+ $(GLSL_SRCDIR)/ast_type.cpp \
+ $(GLSL_SRCDIR)/builtin_variables.cpp \
+ $(GLSL_SRCDIR)/glsl_parser_extras.cpp \
+ $(GLSL_SRCDIR)/glsl_types.cpp \
+ $(GLSL_SRCDIR)/glsl_symbol_table.cpp \
+ $(GLSL_SRCDIR)/hir_field_selection.cpp \
+ $(GLSL_SRCDIR)/ir_basic_block.cpp \
+ $(GLSL_SRCDIR)/ir_builder.cpp \
+ $(GLSL_SRCDIR)/ir_clone.cpp \
+ $(GLSL_SRCDIR)/ir_constant_expression.cpp \
+ $(GLSL_SRCDIR)/ir.cpp \
+ $(GLSL_SRCDIR)/ir_expression_flattening.cpp \
+ $(GLSL_SRCDIR)/ir_function_can_inline.cpp \
+ $(GLSL_SRCDIR)/ir_function_detect_recursion.cpp \
+ $(GLSL_SRCDIR)/ir_function.cpp \
+ $(GLSL_SRCDIR)/ir_hierarchical_visitor.cpp \
+ $(GLSL_SRCDIR)/ir_hv_accept.cpp \
+ $(GLSL_SRCDIR)/ir_import_prototypes.cpp \
+ $(GLSL_SRCDIR)/ir_print_visitor.cpp \
+ $(GLSL_SRCDIR)/ir_reader.cpp \
+ $(GLSL_SRCDIR)/ir_rvalue_visitor.cpp \
+ $(GLSL_SRCDIR)/ir_set_program_inouts.cpp \
+ $(GLSL_SRCDIR)/ir_validate.cpp \
+ $(GLSL_SRCDIR)/ir_variable_refcount.cpp \
+ $(GLSL_SRCDIR)/linker.cpp \
+ $(GLSL_SRCDIR)/link_functions.cpp \
+ $(GLSL_SRCDIR)/link_uniforms.cpp \
+ $(GLSL_SRCDIR)/link_uniform_initializers.cpp \
+ $(GLSL_SRCDIR)/loop_analysis.cpp \
+ $(GLSL_SRCDIR)/loop_controls.cpp \
+ $(GLSL_SRCDIR)/loop_unroll.cpp \
+ $(GLSL_SRCDIR)/lower_clip_distance.cpp \
+ $(GLSL_SRCDIR)/lower_discard.cpp \
+ $(GLSL_SRCDIR)/lower_discard_flow.cpp \
+ $(GLSL_SRCDIR)/lower_if_to_cond_assign.cpp \
+ $(GLSL_SRCDIR)/lower_instructions.cpp \
+ $(GLSL_SRCDIR)/lower_jumps.cpp \
+ $(GLSL_SRCDIR)/lower_mat_op_to_vec.cpp \
+ $(GLSL_SRCDIR)/lower_noise.cpp \
+ $(GLSL_SRCDIR)/lower_texture_projection.cpp \
+ $(GLSL_SRCDIR)/lower_variable_index_to_cond_assign.cpp \
+ $(GLSL_SRCDIR)/lower_vec_index_to_cond_assign.cpp \
+ $(GLSL_SRCDIR)/lower_vec_index_to_swizzle.cpp \
+ $(GLSL_SRCDIR)/lower_vector.cpp \
+ $(GLSL_SRCDIR)/lower_output_reads.cpp \
+ $(GLSL_SRCDIR)/opt_algebraic.cpp \
+ $(GLSL_SRCDIR)/opt_array_splitting.cpp \
+ $(GLSL_SRCDIR)/opt_constant_folding.cpp \
+ $(GLSL_SRCDIR)/opt_constant_propagation.cpp \
+ $(GLSL_SRCDIR)/opt_constant_variable.cpp \
+ $(GLSL_SRCDIR)/opt_copy_propagation.cpp \
+ $(GLSL_SRCDIR)/opt_copy_propagation_elements.cpp \
+ $(GLSL_SRCDIR)/opt_dead_code.cpp \
+ $(GLSL_SRCDIR)/opt_dead_code_local.cpp \
+ $(GLSL_SRCDIR)/opt_dead_functions.cpp \
+ $(GLSL_SRCDIR)/opt_function_inlining.cpp \
+ $(GLSL_SRCDIR)/opt_if_simplification.cpp \
+ $(GLSL_SRCDIR)/opt_noop_swizzle.cpp \
+ $(GLSL_SRCDIR)/opt_redundant_jumps.cpp \
+ $(GLSL_SRCDIR)/opt_structure_splitting.cpp \
+ $(GLSL_SRCDIR)/opt_swizzle_swizzle.cpp \
+ $(GLSL_SRCDIR)/opt_tree_grafting.cpp \
+ $(GLSL_SRCDIR)/s_expression.cpp
# glsl_compiler
-GLSL_COMPILER_CXX_FILES := \
- standalone_scaffolding.cpp \
- main.cpp
+GLSL_COMPILER_CXX_FILES = \
+ $(GLSL_SRCDIR)/standalone_scaffolding.cpp \
+ $(GLSL_SRCDIR)/main.cpp
# builtin_compiler
#
@@ -95,14 +97,14 @@ GLSL_COMPILER_CXX_FILES := \
# For this to work, a dummy version of builtin_function.cpp,
# builtin_stubs.cpp, is used.
-BUILTIN_COMPILER_CXX_FILES := \
- builtin_stubs.cpp
+BUILTIN_COMPILER_CXX_FILES = \
+ $(GLSL_SRCDIR)/builtin_stubs.cpp
-BUILTIN_COMPILER_GENERATED_CXX_FILES := \
- glsl_lexer.cpp \
- glsl_parser.cpp
+BUILTIN_COMPILER_GENERATED_CXX_FILES = \
+ $(GLSL_SRCDIR)/glsl_lexer.cpp \
+ $(GLSL_SRCDIR)/glsl_parser.cpp
# libglsl generated sources
-LIBGLSL_GENERATED_CXX_FILES := \
- $(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
- builtin_function.cpp
+LIBGLSL_GENERATED_CXX_FILES = \
+ $(GLSL_SRCDIR)/$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
+ $(GLSL_SRCDIR)/builtin_function.cpp
diff --git a/mesalib/src/glsl/opt_algebraic.cpp b/mesalib/src/glsl/opt_algebraic.cpp
index cade9611d..d39761260 100644
--- a/mesalib/src/glsl/opt_algebraic.cpp
+++ b/mesalib/src/glsl/opt_algebraic.cpp
@@ -34,6 +34,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
/**
* Visitor class for replacing expressions with ir_constant values.
*/
@@ -68,6 +70,8 @@ public:
bool progress;
};
+} /* unnamed namespace */
+
static inline bool
is_vec_zero(ir_constant *ir)
{
diff --git a/mesalib/src/glsl/opt_constant_folding.cpp b/mesalib/src/glsl/opt_constant_folding.cpp
index dcad59997..7d94d481c 100644
--- a/mesalib/src/glsl/opt_constant_folding.cpp
+++ b/mesalib/src/glsl/opt_constant_folding.cpp
@@ -32,6 +32,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
/**
* Visitor class for replacing expressions with ir_constant values.
*/
@@ -56,6 +58,8 @@ public:
bool progress;
};
+} /* unnamed namespace */
+
void
ir_constant_folding_visitor::handle_rvalue(ir_rvalue **rvalue)
{
diff --git a/mesalib/src/glsl/opt_constant_propagation.cpp b/mesalib/src/glsl/opt_constant_propagation.cpp
index 2601b52f6..c5ae36b69 100644
--- a/mesalib/src/glsl/opt_constant_propagation.cpp
+++ b/mesalib/src/glsl/opt_constant_propagation.cpp
@@ -41,6 +41,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
class acp_entry : public exec_node
{
public:
@@ -450,6 +452,8 @@ ir_constant_propagation_visitor::add_constant(ir_assignment *ir)
this->acp->push_tail(entry);
}
+} /* unnamed namespace */
+
/**
* Does a constant propagation pass on the code present in the instruction stream.
*/
diff --git a/mesalib/src/glsl/opt_constant_variable.cpp b/mesalib/src/glsl/opt_constant_variable.cpp
index f3bc8675e..1bbaf8e47 100644
--- a/mesalib/src/glsl/opt_constant_variable.cpp
+++ b/mesalib/src/glsl/opt_constant_variable.cpp
@@ -37,6 +37,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
struct assignment_entry {
exec_node link;
int assignment_count;
@@ -55,6 +57,8 @@ public:
exec_list list;
};
+} /* unnamed namespace */
+
static struct assignment_entry *
get_assignment_entry(ir_variable *var, exec_list *list)
{
diff --git a/mesalib/src/glsl/opt_copy_propagation.cpp b/mesalib/src/glsl/opt_copy_propagation.cpp
index 923619db4..2952ce594 100644
--- a/mesalib/src/glsl/opt_copy_propagation.cpp
+++ b/mesalib/src/glsl/opt_copy_propagation.cpp
@@ -38,6 +38,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
class acp_entry : public exec_node
{
public:
@@ -107,6 +109,8 @@ public:
void *mem_ctx;
};
+} /* unnamed namespace */
+
ir_visitor_status
ir_copy_propagation_visitor::visit_enter(ir_function_signature *ir)
{
diff --git a/mesalib/src/glsl/opt_copy_propagation_elements.cpp b/mesalib/src/glsl/opt_copy_propagation_elements.cpp
index 11d9d7baf..de9f4ef6f 100644
--- a/mesalib/src/glsl/opt_copy_propagation_elements.cpp
+++ b/mesalib/src/glsl/opt_copy_propagation_elements.cpp
@@ -49,6 +49,8 @@
static bool debug = false;
+namespace {
+
class acp_entry : public exec_node
{
public:
@@ -135,6 +137,8 @@ public:
void *shader_mem_ctx;
};
+} /* unnamed namespace */
+
ir_visitor_status
ir_copy_propagation_elements_visitor::visit_enter(ir_function_signature *ir)
{
diff --git a/mesalib/src/glsl/opt_dead_code_local.cpp b/mesalib/src/glsl/opt_dead_code_local.cpp
index 4af78a72c..8c31802a6 100644
--- a/mesalib/src/glsl/opt_dead_code_local.cpp
+++ b/mesalib/src/glsl/opt_dead_code_local.cpp
@@ -40,6 +40,8 @@
static bool debug = false;
+namespace {
+
class assignment_entry : public exec_node
{
public:
@@ -138,6 +140,7 @@ public:
ir_hierarchical_visitor *visitor;
};
+} /* unnamed namespace */
/**
* Adds an entry to the available copy list if it's a plain assignment
diff --git a/mesalib/src/glsl/opt_dead_functions.cpp b/mesalib/src/glsl/opt_dead_functions.cpp
index f50349395..cd3b2c12e 100644
--- a/mesalib/src/glsl/opt_dead_functions.cpp
+++ b/mesalib/src/glsl/opt_dead_functions.cpp
@@ -32,6 +32,8 @@
#include "ir_expression_flattening.h"
#include "glsl_types.h"
+namespace {
+
class signature_entry : public exec_node
{
public:
@@ -67,6 +69,7 @@ public:
void *mem_ctx;
};
+} /* unnamed namespace */
signature_entry *
ir_dead_functions_visitor::get_signature_entry(ir_function_signature *sig)
diff --git a/mesalib/src/glsl/opt_function_inlining.cpp b/mesalib/src/glsl/opt_function_inlining.cpp
index 4ff4d97d9..f9f5bd442 100644
--- a/mesalib/src/glsl/opt_function_inlining.cpp
+++ b/mesalib/src/glsl/opt_function_inlining.cpp
@@ -39,6 +39,8 @@ do_sampler_replacement(exec_list *instructions,
ir_variable *sampler,
ir_dereference *deref);
+namespace {
+
class ir_function_inlining_visitor : public ir_hierarchical_visitor {
public:
ir_function_inlining_visitor()
@@ -60,6 +62,7 @@ public:
bool progress;
};
+} /* unnamed namespace */
bool
do_function_inlining(exec_list *instructions)
diff --git a/mesalib/src/glsl/opt_if_simplification.cpp b/mesalib/src/glsl/opt_if_simplification.cpp
index 7e88208f7..e1a23d94a 100644
--- a/mesalib/src/glsl/opt_if_simplification.cpp
+++ b/mesalib/src/glsl/opt_if_simplification.cpp
@@ -30,6 +30,8 @@
#include "ir.h"
+namespace {
+
class ir_if_simplification_visitor : public ir_hierarchical_visitor {
public:
ir_if_simplification_visitor()
@@ -43,6 +45,8 @@ public:
bool made_progress;
};
+} /* unnamed namespace */
+
/* We only care about the top level "if" instructions, so don't
* descend into expressions.
*/
diff --git a/mesalib/src/glsl/opt_noop_swizzle.cpp b/mesalib/src/glsl/opt_noop_swizzle.cpp
index 0a906aaf1..693719e3d 100644
--- a/mesalib/src/glsl/opt_noop_swizzle.cpp
+++ b/mesalib/src/glsl/opt_noop_swizzle.cpp
@@ -35,6 +35,8 @@
#include "ir_print_visitor.h"
#include "glsl_types.h"
+namespace {
+
class ir_noop_swizzle_visitor : public ir_rvalue_visitor {
public:
ir_noop_swizzle_visitor()
@@ -46,6 +48,8 @@ public:
bool progress;
};
+} /* unnamed namespace */
+
void
ir_noop_swizzle_visitor::handle_rvalue(ir_rvalue **rvalue)
{
diff --git a/mesalib/src/glsl/opt_redundant_jumps.cpp b/mesalib/src/glsl/opt_redundant_jumps.cpp
index f350fa947..8606dcbb7 100644
--- a/mesalib/src/glsl/opt_redundant_jumps.cpp
+++ b/mesalib/src/glsl/opt_redundant_jumps.cpp
@@ -28,6 +28,8 @@
#include "ir.h"
+namespace {
+
class redundant_jumps_visitor : public ir_hierarchical_visitor {
public:
redundant_jumps_visitor()
@@ -42,6 +44,8 @@ public:
bool progress;
};
+} /* unnamed namespace */
+
/* We only care about the top level instructions, so don't descend
* into expressions.
*/
diff --git a/mesalib/src/glsl/opt_structure_splitting.cpp b/mesalib/src/glsl/opt_structure_splitting.cpp
index a21238dd0..60eec53b7 100644
--- a/mesalib/src/glsl/opt_structure_splitting.cpp
+++ b/mesalib/src/glsl/opt_structure_splitting.cpp
@@ -38,6 +38,8 @@
#include "ir_rvalue_visitor.h"
#include "glsl_types.h"
+namespace {
+
static bool debug = false;
// XXX using variable_entry2 here to avoid collision (MSVC multiply-defined
@@ -307,6 +309,8 @@ ir_structure_splitting_visitor::visit_leave(ir_assignment *ir)
return visit_continue;
}
+} /* unnamed namespace */
+
bool
do_structure_splitting(exec_list *instructions)
{
diff --git a/mesalib/src/glsl/opt_swizzle_swizzle.cpp b/mesalib/src/glsl/opt_swizzle_swizzle.cpp
index bc442fa86..7564c6b3b 100644
--- a/mesalib/src/glsl/opt_swizzle_swizzle.cpp
+++ b/mesalib/src/glsl/opt_swizzle_swizzle.cpp
@@ -32,6 +32,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
class ir_swizzle_swizzle_visitor : public ir_hierarchical_visitor {
public:
ir_swizzle_swizzle_visitor()
@@ -44,6 +46,8 @@ public:
bool progress;
};
+} /* unnamed namespace */
+
ir_visitor_status
ir_swizzle_swizzle_visitor::visit_enter(ir_swizzle *ir)
{
diff --git a/mesalib/src/glsl/opt_tree_grafting.cpp b/mesalib/src/glsl/opt_tree_grafting.cpp
index d86eab80e..25b18ea94 100644
--- a/mesalib/src/glsl/opt_tree_grafting.cpp
+++ b/mesalib/src/glsl/opt_tree_grafting.cpp
@@ -54,6 +54,8 @@
#include "ir_optimization.h"
#include "glsl_types.h"
+namespace {
+
static bool debug = false;
class ir_tree_grafting_visitor : public ir_hierarchical_visitor {
@@ -369,6 +371,8 @@ tree_grafting_basic_block(ir_instruction *bb_first,
}
}
+} /* unnamed namespace */
+
/**
* Does a copy propagation pass on the code present in the instruction stream.
*/