[Mesa-dev] [PATCH 16/21] glsl: Add IR builder shortcuts for a bunch of random opcodes.

Erik Faye-Lund kusmabite at gmail.com
Fri Sep 6 05:58:06 PDT 2013


> diff --git a/src/glsl/ir_builder.cpp b/src/glsl/ir_builder.cpp
> index e12ae3c..31a457d 100644
> --- a/src/glsl/ir_builder.cpp
> +++ b/src/glsl/ir_builder.cpp
> @@ -264,6 +264,46 @@ abs(operand a)
>     return expr(ir_unop_abs, a);
>  }
>
> +ir_expression *neg(operand a)
> +{
> +   return expr(ir_unop_neg, a);
> +}
> +
<snip>
> +ir_expression*
> +f2b(operand a)
> +{
> +   return expr(ir_unop_f2b, a);
> +}
> +

Any specific reason for the inconsistent folding before the function name?


More information about the mesa-dev mailing list