diff options
author | Jason Ekstrand <[email protected]> | 2016-01-05 15:56:59 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-01-05 15:56:59 -0800 |
commit | 506a467f16453fe51c65f3f14fb2a37d5ba662d2 (patch) | |
tree | 8d892b5933f86ccf194f50c6820d4b8327548fa2 | |
parent | 71a25a0b074ecaf4d287d1338746075170a17d4f (diff) |
nir/spirv/cfg: Assert that blocks only ever get added once
This effectively prevents infinite loops in cfg_walk_blocks.
-rw-r--r-- | src/glsl/nir/spirv/vtn_cfg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/nir/spirv/vtn_cfg.c b/src/glsl/nir/spirv/vtn_cfg.c index a8e149a00a6..646b960d179 100644 --- a/src/glsl/nir/spirv/vtn_cfg.c +++ b/src/glsl/nir/spirv/vtn_cfg.c @@ -281,6 +281,7 @@ vtn_cfg_walk_blocks(struct vtn_builder *b, struct list_head *cf_list, continue; } + assert(block->node.link.next == NULL); list_addtail(&block->node.link, cf_list); switch (*block->branch & SpvOpCodeMask) { |