aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-01 09:36:37 +0200
committermarha <marha@users.sourceforge.net>2012-10-01 09:36:37 +0200
commit7ed9dbafdbc724c1030404f29678559134de559b (patch)
treec19a8d332c4485b2b84a35ba5dd7b1767b4099b0 /mesalib/src/glsl
parent2cf1e3de4759264eac2fa8ac758ea750636542f8 (diff)
downloadvcxsrv-7ed9dbafdbc724c1030404f29678559134de559b.tar.gz
vcxsrv-7ed9dbafdbc724c1030404f29678559134de559b.tar.bz2
vcxsrv-7ed9dbafdbc724c1030404f29678559134de559b.zip
libxcb mesa pixman xkeyboard-config git update 1 oct 2012
libxcb: 23911a707b8845bff52cd7853fc5d59fb0823cef mesa: c321b1bef15e2807de3f6225c4abcbf48969997a pixman: 183afcf1d95625a1f237ef349a1c8931d94d000d xkeyboard-config: 159e8db2a3829a11801d06cc6cad6d1378551dd5
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r--mesalib/src/glsl/SConscript2
-rw-r--r--mesalib/src/glsl/opt_structure_splitting.cpp38
2 files changed, 18 insertions, 22 deletions
diff --git a/mesalib/src/glsl/SConscript b/mesalib/src/glsl/SConscript
index b034f3b06..6314c7551 100644
--- a/mesalib/src/glsl/SConscript
+++ b/mesalib/src/glsl/SConscript
@@ -87,7 +87,7 @@ else:
command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
)
- env.Depends(builtin_glsl_function, ['builtins/tools/generate_builtins.py', 'builtins/tools/texture_builtins.py'] + Glob('builtins/ir/*'))
+ env.Depends(builtin_glsl_function, ['builtins/tools/generate_builtins.py', '#src/glsl/builtins/tools/texture_builtins.py'] + Glob('builtins/ir/*'))
Export('builtin_glsl_function')
diff --git a/mesalib/src/glsl/opt_structure_splitting.cpp b/mesalib/src/glsl/opt_structure_splitting.cpp
index 60eec53b7..9b3f048e4 100644
--- a/mesalib/src/glsl/opt_structure_splitting.cpp
+++ b/mesalib/src/glsl/opt_structure_splitting.cpp
@@ -42,14 +42,10 @@ namespace {
static bool debug = false;
-// XXX using variable_entry2 here to avoid collision (MSVC multiply-defined
-// function) with the variable_entry class seen in ir_variable_refcount.h
-// Perhaps we can use the one in ir_variable_refcount.h and make this class
-// here go away?
-class variable_entry2 : public exec_node
+class variable_entry : public exec_node
{
public:
- variable_entry2(ir_variable *var)
+ variable_entry(ir_variable *var)
{
this->var = var;
this->whole_structure_access = 0;
@@ -95,7 +91,7 @@ public:
virtual ir_visitor_status visit_enter(ir_assignment *);
virtual ir_visitor_status visit_enter(ir_function_signature *);
- variable_entry2 *get_variable_entry2(ir_variable *var);
+ variable_entry *get_variable_entry(ir_variable *var);
/* List of variable_entry */
exec_list variable_list;
@@ -103,8 +99,8 @@ public:
void *mem_ctx;
};
-variable_entry2 *
-ir_structure_reference_visitor::get_variable_entry2(ir_variable *var)
+variable_entry *
+ir_structure_reference_visitor::get_variable_entry(ir_variable *var)
{
assert(var);
@@ -112,12 +108,12 @@ ir_structure_reference_visitor::get_variable_entry2(ir_variable *var)
return NULL;
foreach_iter(exec_list_iterator, iter, this->variable_list) {
- variable_entry2 *entry = (variable_entry2 *)iter.get();
+ variable_entry *entry = (variable_entry *)iter.get();
if (entry->var == var)
return entry;
}
- variable_entry2 *entry = new(mem_ctx) variable_entry2(var);
+ variable_entry *entry = new(mem_ctx) variable_entry(var);
this->variable_list.push_tail(entry);
return entry;
}
@@ -126,7 +122,7 @@ ir_structure_reference_visitor::get_variable_entry2(ir_variable *var)
ir_visitor_status
ir_structure_reference_visitor::visit(ir_variable *ir)
{
- variable_entry2 *entry = this->get_variable_entry2(ir);
+ variable_entry *entry = this->get_variable_entry(ir);
if (entry)
entry->declaration = true;
@@ -138,7 +134,7 @@ ir_visitor_status
ir_structure_reference_visitor::visit(ir_dereference_variable *ir)
{
ir_variable *const var = ir->variable_referenced();
- variable_entry2 *entry = this->get_variable_entry2(var);
+ variable_entry *entry = this->get_variable_entry(var);
if (entry)
entry->whole_structure_access++;
@@ -200,12 +196,12 @@ public:
void split_deref(ir_dereference **deref);
void handle_rvalue(ir_rvalue **rvalue);
- variable_entry2 *get_splitting_entry(ir_variable *var);
+ variable_entry *get_splitting_entry(ir_variable *var);
exec_list *variable_list;
};
-variable_entry2 *
+variable_entry *
ir_structure_splitting_visitor::get_splitting_entry(ir_variable *var)
{
assert(var);
@@ -214,7 +210,7 @@ ir_structure_splitting_visitor::get_splitting_entry(ir_variable *var)
return NULL;
foreach_iter(exec_list_iterator, iter, *this->variable_list) {
- variable_entry2 *entry = (variable_entry2 *)iter.get();
+ variable_entry *entry = (variable_entry *)iter.get();
if (entry->var == var) {
return entry;
}
@@ -234,7 +230,7 @@ ir_structure_splitting_visitor::split_deref(ir_dereference **deref)
if (!deref_var)
return;
- variable_entry2 *entry = get_splitting_entry(deref_var->var);
+ variable_entry *entry = get_splitting_entry(deref_var->var);
if (!entry)
return;
@@ -269,8 +265,8 @@ ir_structure_splitting_visitor::visit_leave(ir_assignment *ir)
{
ir_dereference_variable *lhs_deref = ir->lhs->as_dereference_variable();
ir_dereference_variable *rhs_deref = ir->rhs->as_dereference_variable();
- variable_entry2 *lhs_entry = lhs_deref ? get_splitting_entry(lhs_deref->var) : NULL;
- variable_entry2 *rhs_entry = rhs_deref ? get_splitting_entry(rhs_deref->var) : NULL;
+ variable_entry *lhs_entry = lhs_deref ? get_splitting_entry(lhs_deref->var) : NULL;
+ variable_entry *rhs_entry = rhs_deref ? get_splitting_entry(rhs_deref->var) : NULL;
const glsl_type *type = ir->rhs->type;
if ((lhs_entry || rhs_entry) && !ir->condition) {
@@ -320,7 +316,7 @@ do_structure_splitting(exec_list *instructions)
/* Trim out variables we can't split. */
foreach_iter(exec_list_iterator, iter, refs.variable_list) {
- variable_entry2 *entry = (variable_entry2 *)iter.get();
+ variable_entry *entry = (variable_entry *)iter.get();
if (debug) {
printf("structure %s@%p: decl %d, whole_access %d\n",
@@ -342,7 +338,7 @@ do_structure_splitting(exec_list *instructions)
* components.
*/
foreach_iter(exec_list_iterator, iter, refs.variable_list) {
- variable_entry2 *entry = (variable_entry2 *)iter.get();
+ variable_entry *entry = (variable_entry *)iter.get();
const struct glsl_type *type = entry->var->type;
entry->mem_ctx = ralloc_parent(entry->var);