From: Jason Ekstrand Date: Wed, 30 Dec 2015 03:23:25 +0000 (-0800) Subject: nir/spirv/cfg: Handle discard X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=451fe2670c0106633d765792d0852ddd3073e4a9;p=mesa.git nir/spirv/cfg: Handle discard --- diff --git a/src/glsl/nir/spirv/vtn_cfg.c b/src/glsl/nir/spirv/vtn_cfg.c index 03d2c43018d..eddaa8c4672 100644 --- a/src/glsl/nir/spirv/vtn_cfg.c +++ b/src/glsl/nir/spirv/vtn_cfg.c @@ -470,6 +470,12 @@ vtn_emit_branch(struct vtn_builder *b, enum vtn_branch_type branch_type, case vtn_branch_type_return: nir_jump(&b->nb, nir_jump_return); break; + case vtn_branch_type_discard: { + nir_intrinsic_instr *discard = + nir_intrinsic_instr_create(b->nb.shader, nir_intrinsic_discard); + nir_builder_instr_insert(&b->nb, &discard->instr); + break; + } default: unreachable("Invalid branch type"); }