diff options
author | marha <marha@users.sourceforge.net> | 2011-01-12 20:34:04 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-12 20:34:04 +0000 |
commit | 2ebdcfeee38bed8c65daa78aa7d18d8d1d93ed85 (patch) | |
tree | 276bf91b61421f0043fc8ac00a13af467ecc10f2 /mesalib/src/glsl/ir.cpp | |
parent | 4613071e75e4828ce69ac1f17d73b0b7b6275578 (diff) | |
download | vcxsrv-2ebdcfeee38bed8c65daa78aa7d18d8d1d93ed85.tar.gz vcxsrv-2ebdcfeee38bed8c65daa78aa7d18d8d1d93ed85.tar.bz2 vcxsrv-2ebdcfeee38bed8c65daa78aa7d18d8d1d93ed85.zip |
xkeyboard-config libX11 mesalib git update 12 jan 2011
Diffstat (limited to 'mesalib/src/glsl/ir.cpp')
-rw-r--r-- | mesalib/src/glsl/ir.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp index b47f4bd9d..dfab1f1af 100644 --- a/mesalib/src/glsl/ir.cpp +++ b/mesalib/src/glsl/ir.cpp @@ -261,12 +261,38 @@ ir_expression::ir_expression(int op, ir_rvalue *op0) case ir_unop_floor:
case ir_unop_fract:
case ir_unop_round_even:
+ case ir_unop_sin:
case ir_unop_cos:
+ case ir_unop_sin_reduced:
+ case ir_unop_cos_reduced:
case ir_unop_dFdx:
case ir_unop_dFdy:
this->type = op0->type;
break;
+ case ir_unop_f2i:
+ case ir_unop_b2i:
+ this->type = glsl_type::get_instance(GLSL_TYPE_INT,
+ op0->type->vector_elements, 1);
+ break;
+
+ case ir_unop_b2f:
+ case ir_unop_i2f:
+ case ir_unop_u2f:
+ this->type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
+ op0->type->vector_elements, 1);
+ break;
+
+ case ir_unop_f2b:
+ case ir_unop_i2b:
+ this->type = glsl_type::get_instance(GLSL_TYPE_BOOL,
+ op0->type->vector_elements, 1);
+ break;
+
+ case ir_unop_noise:
+ this->type = glsl_type::float_type;
+ break;
+
case ir_unop_any:
this->type = glsl_type::bool_type;
break;
@@ -302,6 +328,8 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1) case ir_binop_max:
case ir_binop_pow:
case ir_binop_mul:
+ case ir_binop_div:
+ case ir_binop_mod:
if (op0->type->is_scalar()) {
this->type = op1->type;
} else if (op1->type->is_scalar()) {
@@ -315,7 +343,11 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1) break;
case ir_binop_logic_and:
+ case ir_binop_logic_xor:
case ir_binop_logic_or:
+ case ir_binop_bit_and:
+ case ir_binop_bit_xor:
+ case ir_binop_bit_or:
if (op0->type->is_scalar()) {
this->type = op1->type;
} else if (op1->type->is_scalar()) {
@@ -323,10 +355,26 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1) }
break;
+ case ir_binop_equal:
+ case ir_binop_nequal:
+ case ir_binop_lequal:
+ case ir_binop_gequal:
+ case ir_binop_less:
+ case ir_binop_greater:
+ assert(op0->type == op1->type);
+ this->type = glsl_type::get_instance(GLSL_TYPE_BOOL,
+ op0->type->vector_elements, 1);
+ break;
+
case ir_binop_dot:
this->type = glsl_type::float_type;
break;
+ case ir_binop_lshift:
+ case ir_binop_rshift:
+ this->type = op0->type;
+ break;
+
default:
assert(!"not reached: missing automatic type setup for ir_expression");
this->type = glsl_type::float_type;
|