From dc58b3f8ccd817fdee390a3df5b8e0fb29d5397c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 2 Apr 2010 02:13:43 -1000 Subject: Add conversion of bool to float as an IR operation to match int to float. --- ast_to_hir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ast_to_hir.cpp') diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index 5e0dcaae22..dd84674004 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -120,7 +120,8 @@ apply_implicit_conversion(const glsl_type *to, ir_rvalue * &from, 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); } -- cgit v1.2.3