From 451fe2670c0106633d765792d0852ddd3073e4a9 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 29 Dec 2015 19:23:25 -0800 Subject: [PATCH] nir/spirv/cfg: Handle discard --- src/glsl/nir/spirv/vtn_cfg.c | 6 ++++++ 1 file changed, 6 insertions(+) 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"); } -- 2.30.2