projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14ebd0f
)
nir/spirv: Handle if's where the merge is also a break or continue
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Mon, 18 Jan 2016 18:10:47 +0000
(10:10 -0800)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Mon, 18 Jan 2016 18:10:47 +0000
(10:10 -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 a57a44363dd2fd0aba32299e2a19925e6ebe02a5..9c2e271cda1bddbeeb02d1bc4d68287b920f80dd 100644
(file)
--- a/
src/glsl/nir/spirv/vtn_cfg.c
+++ b/
src/glsl/nir/spirv/vtn_cfg.c
@@
-351,8
+351,15
@@
vtn_cfg_walk_blocks(struct vtn_builder *b, struct list_head *cf_list,
switch_case, switch_break,
loop_break, loop_cont, merge_block);
- block = merge_block;
- continue;
+ enum vtn_branch_type merge_type =
+ vtn_get_branch_type(merge_block, switch_case, switch_break,
+ loop_break, loop_cont);
+ if (merge_type == vtn_branch_type_none) {
+ block = merge_block;
+ continue;
+ } else {
+ return;
+ }
} else if (if_stmt->then_type != vtn_branch_type_none &&
if_stmt->else_type != vtn_branch_type_none) {
/* Both sides were short-circuited. We're done here. */