case GLSL_TYPE_INT:
return new ir_expression(ir_unop_i2f, desired_type, src, NULL);
case GLSL_TYPE_BOOL:
- assert(!"FINISHME: Convert bool to float.");
+ return new ir_expression(ir_unop_b2f, desired_type, src, NULL);
}
break;
case GLSL_TYPE_BOOL: {
from = new ir_expression(ir_unop_u2f, to, from, NULL);
break;
case GLSL_TYPE_BOOL:
- assert(!"FINISHME: Convert bool to float.");
+ from = new ir_expression(ir_unop_b2f, to, from, NULL);
+ break;
default:
assert(0);
}
1, /* ir_unop_log2 */
1, /* ir_unop_f2i */
1, /* ir_unop_i2f */
+ 1, /* ir_unop_f2b */
+ 1, /* ir_unop_b2f */
1, /* ir_unop_u2f */
1, /* ir_unop_trunc */
ir_unop_log2,
ir_unop_f2i, /**< Float-to-integer conversion. */
ir_unop_i2f, /**< Integer-to-float conversion. */
+ ir_unop_f2b, /**< Float-to-boolean conversion */
+ ir_unop_b2f, /**< Boolean-to-float conversion */
ir_unop_u2f, /**< Unsigned-to-float conversion. */
/**
"log2",
"f2i",
"i2f",
+ "f2b",
+ "b2f",
"u2f",
"trunc",
"ceil",