Fixes constructor-09.glsl and CorrectParse2.frag.
return new ir_expression(ir_unop_f2i, desired_type, src, NULL);
else {
assert(b == GLSL_TYPE_BOOL);
- assert(!"FINISHME: Convert bool to int / uint.");
+ return new ir_expression(ir_unop_f2b, desired_type, src, NULL);
}
case GLSL_TYPE_FLOAT:
switch (b) {
1, /* ir_unop_i2f */
1, /* ir_unop_f2b */
1, /* ir_unop_b2f */
+ 1, /* ir_unop_i2b */
+ 1, /* ir_unop_b2i */
1, /* ir_unop_u2f */
1, /* ir_unop_trunc */
ir_unop_i2f, /**< Integer-to-float conversion. */
ir_unop_f2b, /**< Float-to-boolean conversion */
ir_unop_b2f, /**< Boolean-to-float conversion */
+ ir_unop_i2b, /**< int-to-boolean conversion */
+ ir_unop_b2i, /**< Boolean-to-int conversion */
ir_unop_u2f, /**< Unsigned-to-float conversion. */
/**
"i2f",
"f2b",
"b2f",
+ "i2b",
+ "b2i",
"u2f",
"trunc",
"ceil",