projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5693637
)
nir/spirv/cfg: Handle discard
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 30 Dec 2015 03:23:25 +0000
(19:23 -0800)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 30 Dec 2015 03:23:25 +0000
(19:23 -0800)
src/glsl/nir/spirv/vtn_cfg.c
patch
|
blob
|
history
diff --git
a/src/glsl/nir/spirv/vtn_cfg.c
b/src/glsl/nir/spirv/vtn_cfg.c
index 03d2c43018dffe90770ad261a562c57d9c2bafa3..eddaa8c46721b22711b372be0d787119ded9b36e 100644
(file)
--- 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");
}