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;
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);
}
}
}
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));
#include "nir/nir.h"
#include "nir/nir_builder.h"
-#include "nir/nir_array.h"
+#include "util/u_dynarray.h"
#include "nir_spirv.h"
#include "spirv.h"
struct vtn_case *fallthrough;
/* The uint32_t values that map to this case */
- nir_array values;
+ struct util_dynarray values;
/* True if this is the default case */
bool is_default;