diff options
Diffstat (limited to 'src/compiler/spirv/spirv_to_nir.c')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 7d2fafe4bde..5e91f8815e8 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -2984,15 +2984,7 @@ vtn_handle_atomics(struct vtn_builder *b, SpvOp opcode, static nir_alu_instr * create_vec(struct vtn_builder *b, unsigned num_components, unsigned bit_size) { - nir_op op; - switch (num_components) { - case 1: op = nir_op_imov; break; - case 2: op = nir_op_vec2; break; - case 3: op = nir_op_vec3; break; - case 4: op = nir_op_vec4; break; - default: vtn_fail("bad vector size: %u", num_components); - } - + nir_op op = nir_op_vec(num_components); nir_alu_instr *vec = nir_alu_instr_create(b->shader, op); nir_ssa_dest_init(&vec->instr, &vec->dest.dest, num_components, bit_size, NULL); |