bi_emit(ctx, combine);
}
+static void
+bi_emit_discard(bi_context *ctx, nir_intrinsic_instr *instr)
+{
+ /* Goofy lowering */
+ bi_instruction discard = {
+ .type = BI_DISCARD,
+ .cond = BI_COND_EQ,
+ .src_types = { nir_type_uint32, nir_type_uint32 },
+ .src = { BIR_INDEX_ZERO, BIR_INDEX_ZERO },
+ };
+
+ bi_emit(ctx, discard);
+}
+
static void
bi_emit_discard_if(bi_context *ctx, nir_intrinsic_instr *instr)
{
bi_emit_ld_frag_coord(ctx, instr);
break;
+ case nir_intrinsic_discard:
+ bi_emit_discard(ctx, instr);
+ break;
+
case nir_intrinsic_discard_if:
bi_emit_discard_if(ctx, instr);
break;