[Mesa-dev] [PATCH 1/3] nir/opcodes: Fix the folding expression for usub_borrow

Iago Toral itoral at igalia.com
Thu Jan 7 07:10:49 PST 2016


Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

On Wed, 2016-01-06 at 15:30 -0800, Jason Ekstrand wrote:
> ---
>  src/glsl/nir/nir_opcodes.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py
> index 1cd01a4..4bc6d16 100644
> --- a/src/glsl/nir/nir_opcodes.py
> +++ b/src/glsl/nir/nir_opcodes.py
> @@ -366,7 +366,7 @@ binop_convert("uadd_carry", tbool, tuint, commutative, "src0 + src1 < src0")
>  # returns a boolean representing the borrow resulting from the subtraction
>  # of the two unsigned arguments.
>  
> -binop_convert("usub_borrow", tbool, tuint, "", "src1 < src0")
> +binop_convert("usub_borrow", tbool, tuint, "", "src0 < src1")
>  
>  binop("fmod", tfloat, "", "src0 - src1 * floorf(src0 / src1)")
>  binop("umod", tuint, "", "src1 == 0 ? 0 : src0 % src1")




More information about the mesa-dev mailing list