glsl: Bitwise conversion operator support in ir_expression.
Signed-off-by: Olivier Galibert <galibert@pobox.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:

committed by
Kenneth Graunke

parent
500dcbb1aa
commit
4fab150559
@@ -273,6 +273,7 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
|
|||||||
case ir_unop_f2i:
|
case ir_unop_f2i:
|
||||||
case ir_unop_b2i:
|
case ir_unop_b2i:
|
||||||
case ir_unop_u2i:
|
case ir_unop_u2i:
|
||||||
|
case ir_unop_bitcast_f2i:
|
||||||
this->type = glsl_type::get_instance(GLSL_TYPE_INT,
|
this->type = glsl_type::get_instance(GLSL_TYPE_INT,
|
||||||
op0->type->vector_elements, 1);
|
op0->type->vector_elements, 1);
|
||||||
break;
|
break;
|
||||||
@@ -280,6 +281,8 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
|
|||||||
case ir_unop_b2f:
|
case ir_unop_b2f:
|
||||||
case ir_unop_i2f:
|
case ir_unop_i2f:
|
||||||
case ir_unop_u2f:
|
case ir_unop_u2f:
|
||||||
|
case ir_unop_bitcast_i2f:
|
||||||
|
case ir_unop_bitcast_u2f:
|
||||||
this->type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
|
this->type = glsl_type::get_instance(GLSL_TYPE_FLOAT,
|
||||||
op0->type->vector_elements, 1);
|
op0->type->vector_elements, 1);
|
||||||
break;
|
break;
|
||||||
@@ -291,6 +294,7 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ir_unop_i2u:
|
case ir_unop_i2u:
|
||||||
|
case ir_unop_bitcast_f2u:
|
||||||
this->type = glsl_type::get_instance(GLSL_TYPE_UINT,
|
this->type = glsl_type::get_instance(GLSL_TYPE_UINT,
|
||||||
op0->type->vector_elements, 1);
|
op0->type->vector_elements, 1);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user