From: Jason Ekstrand Date: Tue, 12 Jan 2016 01:02:27 +0000 (-0800) Subject: nir/spirv: Stop wrapping carry/borrow in b2i X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c381906bbd1d9700edbb87b03267391d111000cd;p=mesa.git nir/spirv: Stop wrapping carry/borrow in b2i The upstream versions now return an integer like GLSL/SPIR-V want. --- diff --git a/src/glsl/nir/spirv/vtn_alu.c b/src/glsl/nir/spirv/vtn_alu.c index 70875007ec7..f1bca439d87 100644 --- a/src/glsl/nir/spirv/vtn_alu.c +++ b/src/glsl/nir/spirv/vtn_alu.c @@ -309,15 +309,13 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode, case SpvOpIAddCarry: assert(glsl_type_is_struct(val->ssa->type)); val->ssa->elems[0]->def = nir_iadd(&b->nb, src[0], src[1]); - val->ssa->elems[1]->def = - nir_b2i(&b->nb, nir_uadd_carry(&b->nb, src[0], src[1])); + val->ssa->elems[1]->def = nir_uadd_carry(&b->nb, src[0], src[1]); return; case SpvOpISubBorrow: assert(glsl_type_is_struct(val->ssa->type)); val->ssa->elems[0]->def = nir_isub(&b->nb, src[0], src[1]); - val->ssa->elems[1]->def = - nir_b2i(&b->nb, nir_usub_borrow(&b->nb, src[0], src[1])); + val->ssa->elems[1]->def = nir_usub_borrow(&b->nb, src[0], src[1]); return; case SpvOpUMulExtended: