summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_cfg.c
diff options
context:
space:
mode:
authorThomas Helland <[email protected]>2017-06-07 20:45:41 +0200
committerMarek Olšák <[email protected]>2017-06-07 21:07:24 +0200
commite558a7a9888ee56863f11e7ede387689626f6ea9 (patch)
tree341f8df3bb26951fdd3f4c7b8992719047a9c886 /src/compiler/spirv/vtn_cfg.c
parentbc3a2be6c91d514c744c72ec97aeced7bcd57265 (diff)
nir: Port to u_dynarray
Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_cfg.c')
-rw-r--r--src/compiler/spirv/vtn_cfg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c
index 54248b111d7..50ef767deac 100644
--- a/src/compiler/spirv/vtn_cfg.c
+++ b/src/compiler/spirv/vtn_cfg.c
@@ -183,7 +183,7 @@ vtn_add_case(struct vtn_builder *b, struct vtn_switch *swtch,
list_inithead(&c->body);
c->start_block = case_block;
c->fallthrough = NULL;
- nir_array_init(&c->values, b);
+ util_dynarray_init(&c->values, b);
c->is_default = false;
c->visited = false;
@@ -195,7 +195,7 @@ vtn_add_case(struct vtn_builder *b, struct vtn_switch *swtch,
if (is_default) {
case_block->switch_case->is_default = true;
} else {
- nir_array_add(&case_block->switch_case->values, uint32_t, val);
+ util_dynarray_append(&case_block->switch_case->values, uint32_t, val);
}
}
@@ -709,7 +709,7 @@ vtn_emit_cf_list(struct vtn_builder *b, struct list_head *cf_list,
}
nir_ssa_def *cond = NULL;
- nir_array_foreach(&cse->values, uint32_t, val) {
+ util_dynarray_foreach(&cse->values, uint32_t, val) {
nir_ssa_def *is_val =
nir_ieq(&b->nb, sel, nir_imm_int(&b->nb, *val));