[Mesa-dev] [PATCH v2 13/28] glsl/ir: Add builder support for functions with double floats
Ian Romanick
idr at freedesktop.org
Fri Feb 6 00:03:10 PST 2015
This patch is
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
On 02/06/2015 06:56 AM, Ilia Mirkin wrote:
> From: Dave Airlie <airlied at gmail.com>
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> Reviewed-by: Matt Turner <mattst88 at gmail.com>
> ---
> src/glsl/ir_builder.cpp | 23 +++++++++++++++++++++++
> src/glsl/ir_builder.h | 5 +++++
> 2 files changed, 28 insertions(+)
>
> diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
> index a2f6f29..37bbffa 100644
> --- a/src/glsl/ir_builder.cpp
> +++ b/src/glsl/ir_builder.cpp
> @@ -251,6 +251,11 @@ ir_expression *round_even(operand a)
> return expr(ir_unop_round_even, a);
> }
>
> +ir_expression *fract(operand a)
> +{
> + return expr(ir_unop_fract, a);
> +}
> +
> /* dot for vectors, mul for scalars */
> ir_expression *dot(operand a, operand b)
> {
> @@ -515,6 +520,24 @@ interpolate_at_sample(operand a, operand b)
> }
>
> ir_expression *
> +f2d(operand a)
> +{
> + return expr(ir_unop_f2d, a);
> +}
> +
> +ir_expression *
> +i2d(operand a)
> +{
> + return expr(ir_unop_i2d, a);
> +}
> +
> +ir_expression *
> +u2d(operand a)
> +{
> + return expr(ir_unop_u2d, a);
> +}
> +
> +ir_expression *
> fma(operand a, operand b, operand c)
> {
> return expr(ir_triop_fma, a, b, c);
> diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h
> index 573596c..81571ef 100644
> --- a/src/glsl/ir_builder.h
> +++ b/src/glsl/ir_builder.h
> @@ -138,6 +138,7 @@ ir_expression *div(operand a, operand b);
> ir_expression *carry(operand a, operand b);
> ir_expression *borrow(operand a, operand b);
> ir_expression *round_even(operand a);
> +ir_expression *fract(operand a);
> ir_expression *dot(operand a, operand b);
> ir_expression *clamp(operand a, operand b, operand c);
> ir_expression *saturate(operand a);
> @@ -183,6 +184,10 @@ ir_expression *i2b(operand a);
> ir_expression *f2b(operand a);
> ir_expression *b2f(operand a);
>
> +ir_expression *f2d(operand a);
> +ir_expression *i2d(operand a);
> +ir_expression *u2d(operand a);
> +
> ir_expression *min2(operand a, operand b);
> ir_expression *max2(operand a, operand b);
>
>
More information about the mesa-dev
mailing list