aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_validate.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-07-19 15:12:53 +0200
committermarha <marha@users.sourceforge.net>2014-07-19 15:12:53 +0200
commit61c36feba19d918885022042ea62d068a698c83d (patch)
treefd351953eb2193fe548e7d0e2dca06b34b7c4f4d /mesalib/src/glsl/ir_validate.cpp
parent3865d60ef607cbb00c819e905e40d3628b8eca29 (diff)
parentd0c30e7945e76ac119f6d867e27137c8a76f7e15 (diff)
downloadvcxsrv-61c36feba19d918885022042ea62d068a698c83d.tar.gz
vcxsrv-61c36feba19d918885022042ea62d068a698c83d.tar.bz2
vcxsrv-61c36feba19d918885022042ea62d068a698c83d.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/glsl/ir.cpp xorg-server/config/config.c xorg-server/include/callback.h xorg-server/include/colormap.h xorg-server/include/cursor.h xorg-server/include/dix.h xorg-server/include/dixfont.h xorg-server/include/dixgrabs.h xorg-server/include/gc.h xorg-server/include/gcstruct.h xorg-server/include/input.h xorg-server/include/os.h xorg-server/include/pixmap.h xorg-server/include/property.h xorg-server/include/resource.h xorg-server/include/scrnintstr.h xorg-server/include/window.h xorg-server/include/xkbsrv.h xorg-server/mi/mi.h
Diffstat (limited to 'mesalib/src/glsl/ir_validate.cpp')
-rw-r--r--mesalib/src/glsl/ir_validate.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/mesalib/src/glsl/ir_validate.cpp b/mesalib/src/glsl/ir_validate.cpp
index 271dbe096..37e1ce33e 100644
--- a/mesalib/src/glsl/ir_validate.cpp
+++ b/mesalib/src/glsl/ir_validate.cpp
@@ -49,8 +49,8 @@ public:
this->current_function = NULL;
- this->callback = ir_validate::validate_ir;
- this->data = ht;
+ this->callback_enter = ir_validate::validate_ir;
+ this->data_enter = ht;
}
~ir_validate()
@@ -100,7 +100,7 @@ ir_validate::visit(ir_dereference_variable *ir)
abort();
}
- this->validate_ir(ir, this->data);
+ this->validate_ir(ir, this->data_enter);
return visit_continue;
}
@@ -167,7 +167,7 @@ ir_validate::visit_enter(ir_function *ir)
*/
this->current_function = ir;
- this->validate_ir(ir, this->data);
+ this->validate_ir(ir, this->data_enter);
/* Verify that all of the things stored in the list of signatures are,
* in fact, function signatures.
@@ -211,7 +211,7 @@ ir_validate::visit_enter(ir_function_signature *ir)
abort();
}
- this->validate_ir(ir, this->data);
+ this->validate_ir(ir, this->data_enter);
return visit_continue;
}
@@ -371,6 +371,11 @@ ir_validate::visit_leave(ir_expression *ir)
/* XXX what can we assert here? */
break;
+ case ir_unop_interpolate_at_centroid:
+ assert(ir->operands[0]->type == ir->type);
+ assert(ir->operands[0]->type->is_float());
+ break;
+
case ir_binop_add:
case ir_binop_sub:
case ir_binop_mul:
@@ -510,6 +515,19 @@ ir_validate::visit_leave(ir_expression *ir)
&& ir->operands[1]->type->is_integer());
break;
+ case ir_binop_interpolate_at_offset:
+ assert(ir->operands[0]->type == ir->type);
+ assert(ir->operands[0]->type->is_float());
+ assert(ir->operands[1]->type->components() == 2);
+ assert(ir->operands[1]->type->is_float());
+ break;
+
+ case ir_binop_interpolate_at_sample:
+ assert(ir->operands[0]->type == ir->type);
+ assert(ir->operands[0]->type->is_float());
+ assert(ir->operands[1]->type == glsl_type::int_type);
+ break;
+
case ir_triop_fma:
assert(ir->type->base_type == GLSL_TYPE_FLOAT);
assert(ir->type == ir->operands[0]->type);
@@ -708,7 +726,7 @@ ir_validate::visit_enter(ir_assignment *ir)
}
}
- this->validate_ir(ir, this->data);
+ this->validate_ir(ir, this->data_enter);
return visit_continue;
}