Lines Matching refs:num_components
85 nir_ssa_undef(nir_builder *build, unsigned num_components, unsigned bit_size)
88 nir_ssa_undef_instr_create(build->shader, num_components, bit_size);
98 nir_build_imm(nir_builder *build, unsigned num_components,
102 nir_load_const_instr_create(build->shader, num_components, bit_size);
196 unsigned num_components = op_info->output_size;
197 if (num_components == 0) {
200 num_components = MAX2(num_components,
201 instr->src[i].src.ssa->num_components);
204 assert(num_components != 0);
229 for (unsigned j = instr->src[i].src.ssa->num_components; j < 4; j++) {
230 instr->src[i].swizzle[j] = instr->src[i].src.ssa->num_components - 1;
234 nir_ssa_dest_init(&instr->instr, &instr->dest.dest, num_components,
236 instr->dest.write_mask = (1 << num_components) - 1;
246 nir_vec(nir_builder *build, nir_ssa_def **comp, unsigned num_components)
248 switch (num_components) {
267 nir_fmov_alu(nir_builder *build, nir_alu_src src, unsigned num_components)
270 nir_ssa_dest_init(&mov->instr, &mov->dest.dest, num_components,
273 mov->dest.write_mask = (1 << num_components) - 1;
281 nir_imov_alu(nir_builder *build, nir_alu_src src, unsigned num_components)
284 nir_ssa_dest_init(&mov->instr, &mov->dest.dest, num_components,
287 mov->dest.write_mask = (1 << num_components) - 1;
299 unsigned num_components, bool use_fmov)
303 for (unsigned i = 0; i < num_components; i++)
306 return use_fmov ? nir_fmov_alu(build, alu_src, num_components) :
307 nir_imov_alu(build, alu_src, num_components);
314 assert(src0->num_components == src1->num_components);
315 switch (src0->num_components) {
330 switch (src0->num_components) {
374 nir_ssa_for_src(nir_builder *build, nir_src src, int num_components)
376 if (src.is_ssa && src.ssa->num_components == num_components)
384 return nir_imov_alu(build, alu, num_components);
396 unsigned num_components = nir_ssa_alu_instr_src_components(instr, srcn);
398 if (src->src.is_ssa && (src->src.ssa->num_components == num_components) &&
400 (memcmp(src->swizzle, trivial_swizzle, num_components) == 0))
403 return nir_imov_alu(build, *src, num_components);
409 const unsigned num_components = glsl_get_vector_elements(var->type);
413 load->num_components = num_components;
415 nir_ssa_dest_init(&load->instr, &load->dest, num_components,
425 const unsigned num_components = glsl_get_vector_elements(type);
429 load->num_components = num_components;
431 nir_ssa_dest_init(&load->instr, &load->dest, num_components,
441 const unsigned num_components = glsl_get_vector_elements(var->type);
445 store->num_components = num_components;
456 const unsigned num_components =
461 store->num_components = num_components;
462 store->const_index[0] = writemask & ((1 << num_components) - 1);
496 load->num_components = nir_intrinsic_infos[op].dest_components;