zink/spirv: implement b2i32
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 19 Jul 2019 13:03:13 +0000 (15:03 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:47 +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 0455beabfc690aff25d2033450d4610234a08668..56248fa92a7f5bd2bff50a835359659fda6070de 100644 (file)
@@ -806,6 +806,11 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
    UNOP(nir_op_inot, SpvOpNot)
 #undef UNOP
 
+   case nir_op_b2i32:
+      assert(nir_op_infos[alu->op].num_inputs == 1);
+      result = bvec_to_uvec(ctx, src[0], num_components);
+      break;
+
 #define BUILTIN_UNOP(nir_op, spirv_op) \
    case nir_op: \
       assert(nir_op_infos[alu->op].num_inputs == 1); \