gallivm/nir: add imod support
authorDave Airlie <airlied@redhat.com>
Fri, 19 Jun 2020 07:07:31 +0000 (17:07 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 19 Aug 2020 00:16:24 +0000 (10:16 +1000)
Just adds support for the imod instruction

Fixes:
dEQP-VK.glsl.operator.binary_operator.mod.*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>

src/gallium/auxiliary/gallivm/lp_bld_nir.c

index 702a0bd4ec4199873c45cbeea948bc21ad69a371..c7a4973f9da23af64155956ce2cad75a297a813d 100644 (file)
@@ -689,6 +689,7 @@ static LLVMValueRef do_alu_action(struct lp_build_nir_context *bld_base,
       result = lp_build_or(get_int_bld(bld_base, false, src_bit_size[0]),
                            src[0], src[1]);
       break;
+   case nir_op_imod:
    case nir_op_irem:
       result = do_int_mod(bld_base, false, src_bit_size[0], src[0], src[1]);
       break;