zink/spirv: implement some integer ops
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 20 Mar 2019 15:16:45 +0000 (16:16 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:43 +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 e074f39df8a279cb9fd86eb6601f5a09b3d62dea..6b2c75fa96ff6da2c9009aa152934e2b4adf709b 100644 (file)
@@ -762,6 +762,9 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
       result = emit_builtin_binop(ctx, spirv_op, dest_type, src[0], src[1]); \
       break;
 
+   BINOP(nir_op_iadd, SpvOpIAdd)
+   BINOP(nir_op_isub, SpvOpISub)
+   BINOP(nir_op_imul, SpvOpIMul)
    BINOP(nir_op_fadd, SpvOpFAdd)
    BINOP(nir_op_fsub, SpvOpFSub)
    BINOP(nir_op_fmul, SpvOpFMul)