zink: add division ops
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 11 Jul 2019 12:43:32 +0000 (14:43 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:46 +0000 (08:51 +0000)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c

index 775b68116f046b8cc68a3b1056cdcd47a39d4af9..61bb83d917b264b545e6d3762a7bbf11cd9b998a 100644 (file)
@@ -829,9 +829,12 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
    BINOP(nir_op_iadd, SpvOpIAdd)
    BINOP(nir_op_isub, SpvOpISub)
    BINOP(nir_op_imul, SpvOpIMul)
+   BINOP(nir_op_idiv, SpvOpSDiv)
+   BINOP(nir_op_udiv, SpvOpUDiv)
    BINOP(nir_op_fadd, SpvOpFAdd)
    BINOP(nir_op_fsub, SpvOpFSub)
    BINOP(nir_op_fmul, SpvOpFMul)
+   BINOP(nir_op_fdiv, SpvOpFDiv)
    BINOP(nir_op_fmod, SpvOpFMod)
    BINOP(nir_op_flt, SpvOpFUnordLessThan)
    BINOP(nir_op_fge, SpvOpFUnordGreaterThanEqual)