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

Tapani Pälli tapani.palli at intel.com
Tue May 5 23:25:02 PDT 2015


This seems to be used in ast_function.cpp for implementing constructors 
where this type of conversion can happen, so not a implicit conversion 
but a 'conversion constructor'.

(5.4.1 Conversion and Scalar Constructors)

You would need to change that also.


On 05/06/2015 09:17 AM, Dave Airlie wrote:
> 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;
>         }
>
>


More information about the mesa-dev mailing list