[Mesa-dev] [PATCH] glsl/ast: don't implicit convert from double to float

Dave Airlie airlied at gmail.com
Tue May 5 23:17:25 PDT 2015


From: Dave Airlie <airlied at redhat.com>

Implicit conversion can only happen the other way.

This fixes a bug I just saw from writing an incorrect test.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/glsl/ast_to_hir.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 14e6309..1c3780a 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -172,7 +172,6 @@ get_conversion_operation(const glsl_type *to, const glsl_type *from,
       switch (from->base_type) {
       case GLSL_TYPE_INT: return ir_unop_i2f;
       case GLSL_TYPE_UINT: return ir_unop_u2f;
-      case GLSL_TYPE_DOUBLE: return ir_unop_d2f;
       default: return (ir_expression_operation)0;
       }
 
-- 
2.1.0



More information about the mesa-dev mailing list