radv/ac: handle nir irem opcode.
authorDave Airlie <airlied@redhat.com>
Mon, 30 Jan 2017 18:50:30 +0000 (04:50 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 30 Jan 2017 19:38:57 +0000 (05:38 +1000)
This fixes:
dEQP-VK.spirv_assembly.instruction.compute.opsrem.*

Reviewed-by: Andres Rodriguez <andresx7@gmail.com>
Cc: "17.0" <mesa-stable@lists.freedesktop.org"
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_nir_to_llvm.c

index b90148ee8aad59e4f0ef415ab71ded904ee86d1f..bfe6a2e725d91cefa3dc39386388a4ae5ad70210 100644 (file)
@@ -1273,6 +1273,9 @@ static void visit_alu(struct nir_to_llvm_context *ctx, nir_alu_instr *instr)
                src[1] = to_float(ctx, src[1]);
                result = LLVMBuildFRem(ctx->builder, src[0], src[1], "");
                break;
+       case nir_op_irem:
+               result = LLVMBuildSRem(ctx->builder, src[0], src[1], "");
+               break;
        case nir_op_idiv:
                result = LLVMBuildSDiv(ctx->builder, src[0], src[1], "");
                break;