diff options
author | Mark Janes <mark.a.janes@intel.com> | 2017-12-21 12:15:40 -0800 |
---|---|---|
committer | Mark Janes <mark.a.janes@intel.com> | 2017-12-21 12:15:40 -0800 |
commit | 7665383a33f9ce9256aa121cbe4d3bd948dff145 (patch) | |
tree | 2b45faba0c3cae7ced2b78bb207bc7a54910e225 /src | |
parent | b81f1a592b02d3d1928ab232c97675b12cad19fc (diff) |
Revert "spirv: consider bitsize when handling OpSwitch cases"
This reverts commit 9702fac68e8bd07be8871f7925d7f9fb98da3699, which
hangs vulkancts and crucible on all platforms.
The patch is being reverted because it disables continuous integration
testing. The patch from bug 104359 does not apply to master.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104359
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/spirv/vtn_cfg.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c index 9c4cbe2e6a4..8582c4f0e94 100644 --- a/src/compiler/spirv/vtn_cfg.c +++ b/src/compiler/spirv/vtn_cfg.c @@ -513,14 +513,13 @@ vtn_cfg_walk_blocks(struct vtn_builder *b, struct list_head *cf_list, "Selector of OpSelect must have a type of OpTypeInt"); bool is_default = true; - const uint bitsize = nir_alu_type_get_type_size(cond_type); for (const uint32_t *w = block->branch + 2; w < branch_end;) { uint64_t literal = 0; if (!is_default) { - if (bitsize <= 32) { + if (nir_alu_type_get_type_size(cond_type) <= 32) { literal = *(w++); } else { - assert(bitsize == 64); + assert(nir_alu_type_get_type_size(cond_type) == 64); literal = vtn_u64_literal(w); w += 2; } @@ -545,7 +544,7 @@ vtn_cfg_walk_blocks(struct vtn_builder *b, struct list_head *cf_list, /* Finally, we walk over all of the cases one more time and put * them in fall-through order. */ - for (const uint32_t *w = block->branch + 2; w < branch_end;) { + for (const uint32_t *w = block->branch + 2; w < branch_end; w += 2) { struct vtn_block *case_block = vtn_value(b, *w, vtn_value_type_block)->block; @@ -555,13 +554,6 @@ vtn_cfg_walk_blocks(struct vtn_builder *b, struct list_head *cf_list, vtn_assert(case_block->switch_case); vtn_order_case(swtch, case_block->switch_case); - - if (bitsize <= 32) { - w += 2; - } else { - assert(bitsize == 64); - w += 3; - } } enum vtn_branch_type branch_type = |