zink/spirv: implement bcsel
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 19 Jul 2019 12:41:08 +0000 (14:41 +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 d2001eb7de28aa0f003b390e0f316a2fcb4377f5..a78a26b4bb327cd2f60194e7331a5896481c34af 100644 (file)
@@ -941,6 +941,11 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
       }
       break;
 
+   case nir_op_bcsel:
+      assert(nir_op_infos[alu->op].num_inputs == 3);
+      result = emit_triop(ctx, SpvOpSelect, dest_type, src[0], src[1], src[2]);
+      break;
+
    case nir_op_vec2:
    case nir_op_vec3:
    case nir_op_vec4: {