From c381906bbd1d9700edbb87b03267391d111000cd Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 11 Jan 2016 17:02:27 -0800 Subject: [PATCH] nir/spirv: Stop wrapping carry/borrow in b2i The upstream versions now return an integer like GLSL/SPIR-V want. --- src/glsl/nir/spirv/vtn_alu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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: -- 2.30.2