Home
last modified time | relevance | path

Searched refs:swiz (Results 1 – 25 of 107) sorted by relevance

12345

/external/mesa3d/src/compiler/glsl/
Dopt_swizzle.cpp61 ir_swizzle *swiz = (*rvalue)->as_swizzle(); in handle_rvalue() local
63 if (!swiz) in handle_rvalue()
68 while ((swiz2 = swiz->val->as_swizzle()) != NULL) { in handle_rvalue()
81 if (swiz->mask.num_components >= 1) in handle_rvalue()
82 swiz->mask.x = mask2[swiz->mask.x]; in handle_rvalue()
83 if (swiz->mask.num_components >= 2) in handle_rvalue()
84 swiz->mask.y = mask2[swiz->mask.y]; in handle_rvalue()
85 if (swiz->mask.num_components >= 3) in handle_rvalue()
86 swiz->mask.z = mask2[swiz->mask.z]; in handle_rvalue()
87 if (swiz->mask.num_components >= 4) in handle_rvalue()
[all …]
Dopt_constant_propagation.cpp158 ir_swizzle *swiz = NULL; in constant_propagation() local
161 swiz = (*rvalue)->as_swizzle(); in constant_propagation()
162 if (!swiz) in constant_propagation()
165 deref = swiz->val->as_dereference_variable(); in constant_propagation()
177 if (swiz) { in constant_propagation()
179 case 0: channel = swiz->mask.x; break; in constant_propagation()
180 case 1: channel = swiz->mask.y; break; in constant_propagation()
181 case 2: channel = swiz->mask.z; break; in constant_propagation()
182 case 3: channel = swiz->mask.w; break; in constant_propagation()
Dhir_field_selection.cpp60 ir_swizzle *swiz = ir_swizzle::create(op, in _mesa_ast_field_selection_to_hir() local
63 if (swiz != NULL) { in _mesa_ast_field_selection_to_hir()
64 result = swiz; in _mesa_ast_field_selection_to_hir()
Dir_builder_print_visitor.cpp115 const ir_swizzle *swiz = (ir_swizzle *) ir; in is_simple_operand() local
116 return swiz->mask.num_components == 1 && in is_simple_operand()
117 is_simple_operand(swiz->val, depth); in is_simple_operand()
443 static const char swiz[4] = { 'x', 'y', 'z', 'w' }; in print_without_declaration() local
446 print_without_indent("swizzle_%c(", swiz[ir->mask.x]); in print_without_declaration()
452 swiz[ir->mask.x], in print_without_declaration()
456 static const char swiz[4] = { 'X', 'Y', 'Z', 'W' }; in print_without_declaration() local
461 swiz[ir->mask.x], in print_without_declaration()
462 swiz[ir->mask.y], in print_without_declaration()
463 swiz[ir->mask.z], in print_without_declaration()
[all …]
Dopt_constant_folding.cpp84 ir_swizzle *swiz = (*rvalue)->as_swizzle(); in ir_constant_fold() local
85 if (swiz && !swiz->val->as_constant()) in ir_constant_fold()
/external/mesa3d/src/gallium/drivers/vc4/
Dvc4_nir_lower_io.c96 uint8_t swiz, in vc4_nir_get_vattr_channel_vpm() argument
100 &desc->channel[swiz]; in vc4_nir_get_vattr_channel_vpm()
103 if (swiz > PIPE_SWIZZLE_W) { in vc4_nir_get_vattr_channel_vpm()
104 return vc4_nir_get_swizzled_channel(b, vpm_reads, swiz); in vc4_nir_get_vattr_channel_vpm()
106 return vc4_nir_get_swizzled_channel(b, vpm_reads, swiz); in vc4_nir_get_vattr_channel_vpm()
110 nir_i2f32(b, vpm_reads[swiz]), in vc4_nir_get_vattr_channel_vpm()
114 return nir_i2f32(b, vpm_reads[swiz]); in vc4_nir_get_vattr_channel_vpm()
124 vc4_nir_unpack_8f(b, temp, swiz), in vc4_nir_get_vattr_channel_vpm()
131 swiz)), in vc4_nir_get_vattr_channel_vpm()
136 return vc4_nir_unpack_8f(b, vpm, swiz); in vc4_nir_get_vattr_channel_vpm()
[all …]
/external/mesa3d/src/gallium/drivers/freedreno/a2xx/
Dfd2_util.c187 tex_swiz(unsigned swiz) in tex_swiz() argument
189 switch (swiz) { in tex_swiz()
206 unsigned char swiz[4] = { in fd2_tex_swiz() local
210 util_format_compose_swizzles(desc->swizzle, swiz, rswiz); in fd2_tex_swiz()
223 unsigned char swiz[4], rswiz[4]; in fd2_vtx_swiz() local
226 swiz[i] = (swizzle >> i * 3) & 7; in fd2_vtx_swiz()
228 util_format_compose_swizzles(desc->swizzle, swiz, rswiz); in fd2_vtx_swiz()
Dir2_private.h303 static inline unsigned swiz_get(unsigned swiz, unsigned i) in swiz_get() argument
305 return ((swiz >> i * 2) + i) & 3; in swiz_get()
310 unsigned swiz = 0; in swiz_merge() local
312 swiz |= swiz_set(swiz_get(swiz0, swiz_get(swiz1, i)), i); in swiz_merge()
313 return swiz; in swiz_merge()
318 unsigned swiz = 0; in swiz_merge_p() local
320 swiz |= swiz_set(swiz_get(*swiz0, swiz_get(swiz1, i)), i); in swiz_merge_p()
321 *swiz0 = swiz; in swiz_merge_p()
Dir2_assemble.c33 unsigned swiz = 0; in src_swizzle() local
45 swiz |= swiz_set(comps[swiz_get(src->swizzle, i)].c, i); in src_swizzle()
47 return swiz; in src_swizzle()
66 unsigned swiz = 0; in alu_swizzle() local
84 swiz |= swiz_set(i, comp[j].c); in alu_swizzle()
88 return swiz_merge(swiz0, swiz); in alu_swizzle()
121 unsigned swiz = 0; in fetch_swizzle() local
123 swiz |= swiz_get(alu_swiz, i) << i * 2; in fetch_swizzle()
124 return swiz; in fetch_swizzle()
/external/skia/src/gpu/
DGrSwizzle.cpp39 char swiz[5]; in asString() local
42 swiz[i] = IToC(key & 0xfU); in asString()
45 swiz[4] = '\0'; in asString()
46 return SkString(swiz); in asString()
/external/mesa3d/src/freedreno/vulkan/
Dtu_image.c85 compose_swizzle(unsigned char *swiz, const VkComponentMapping *mapping) in compose_swizzle() argument
87 unsigned char src_swiz[4] = { swiz[0], swiz[1], swiz[2], swiz[3] }; in compose_swizzle()
94 swiz[i] = src_swiz[i]; in compose_swizzle()
97 swiz[i] = src_swiz[vk_swiz[i] - VK_COMPONENT_SWIZZLE_R]; in compose_swizzle()
100 swiz[i] = A6XX_TEX_ZERO; in compose_swizzle()
103 swiz[i] = A6XX_TEX_ONE; in compose_swizzle()
118 unsigned char swiz[4] = { in tu6_texswiz() local
127 swiz[0] = A6XX_TEX_Z; in tu6_texswiz()
128 swiz[1] = A6XX_TEX_X; in tu6_texswiz()
129 swiz[2] = A6XX_TEX_Y; in tu6_texswiz()
[all …]
/external/mesa3d/src/gallium/drivers/etnaviv/
Detnaviv_disasm.c292 print_swiz(uint8_t swiz) in print_swiz() argument
295 if (swiz == 0xe4) in print_swiz()
298 const unsigned x = swiz & 0x3; in print_swiz()
299 const unsigned y = (swiz & 0x0C) >> 2; in print_swiz()
300 const unsigned z = (swiz & 0x30) >> 4; in print_swiz()
301 const unsigned w = (swiz & 0xc0) >> 6; in print_swiz()
360 print_swiz(tex->swiz); in print_tex()
398 print_swiz(src->swiz); in print_src()
550 .swiz = instr->tex_swiz, in print_instr()
559 .swiz = instr->src0_swiz, in print_instr()
[all …]
Detnaviv_compiler_nir.h97 update_swiz_mask(nir_alu_instr *alu, nir_dest *dest, unsigned *swiz, unsigned *mask) in update_swiz_mask() argument
99 if (!swiz) in update_swiz_mask()
113 swizzle |= (*swiz >> src_swiz * 2 & 3) << i * 2; in update_swiz_mask()
118 *swiz = swizzle; in update_swiz_mask()
123 real_dest(nir_dest *dest, unsigned *swiz, unsigned *mask) in real_dest() argument
166 update_swiz_mask(alu, dest, swiz, mask); in real_dest()
179 update_swiz_mask(alu, NULL, swiz, mask); in real_dest()
188 return real_dest(&alu->dest.dest, swiz, mask); in real_dest()
Detnaviv_compiler_nir_emit.c156 src[0].swiz = inst_swiz_compose(src[0].swiz, swiz_scalar); in etna_emit_alu()
157 src[1].swiz = inst_swiz_compose(src[1].swiz, swiz_scalar); in etna_emit_alu()
201 .tex.swiz = dst_swiz, in etna_emit_tex()
237 inst.src[0].swiz = INST_SWIZ_BROADCAST(inst.src[0].swiz & 3); in etna_emit_jump()
255 inst.src[0].swiz = INST_SWIZ_BROADCAST(inst.src[0].swiz & 3); in etna_emit_discard()
Detnaviv_asm.c82 VIV_ISA_WORD_1_TEX_SWIZ(inst->tex.swiz) | in etna_assemble()
86 VIV_ISA_WORD_1_SRC0_SWIZ(inst->src[0].swiz) | in etna_assemble()
94 VIV_ISA_WORD_2_SRC1_SWIZ(inst->src[1].swiz) | in etna_assemble()
102 VIV_ISA_WORD_3_SRC2_SWIZ(inst->src[2].swiz) | in etna_assemble()
Detnaviv_format.c323 unsigned char swiz[4] = { in get_texture_swiz() local
330 if (swiz[i] == PIPE_SWIZZLE_Y || swiz[i] == PIPE_SWIZZLE_Z) in get_texture_swiz()
331 swiz[i] = PIPE_SWIZZLE_0; in get_texture_swiz()
343 return VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_R(swiz[0]) | in get_texture_swiz()
344 VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_G(swiz[1]) | in get_texture_swiz()
345 VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_B(swiz[2]) | in get_texture_swiz()
346 VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_A(swiz[3]); in get_texture_swiz()
/external/mesa3d/src/mesa/state_tracker/
Dst_tgsi_lower_yuv.c71 get_swiz(unsigned *swiz, const struct tgsi_src_register *src) in get_swiz() argument
73 swiz[0] = src->SwizzleX; in get_swiz()
74 swiz[1] = src->SwizzleY; in get_swiz()
75 swiz[2] = src->SwizzleZ; in get_swiz()
76 swiz[3] = src->SwizzleW; in get_swiz()
84 unsigned swiz[4]; in reg_src() local
85 get_swiz(swiz, &orig_src->Register); in reg_src()
87 src->Register.SwizzleX = swiz[sx]; in reg_src()
88 src->Register.SwizzleY = swiz[sy]; in reg_src()
89 src->Register.SwizzleZ = swiz[sz]; in reg_src()
[all …]
Dst_nir_lower_builtin.c207 unsigned swiz[NIR_MAX_VEC_COMPONENTS] = {0}; in lower_builtin_block() local
209 swiz[i] = GET_SWZ(element->swizzle, i); in lower_builtin_block()
210 assert(swiz[i] <= SWIZZLE_W); in lower_builtin_block()
212 def = nir_swizzle(b, def, swiz, intrin->num_components); in lower_builtin_block()
/external/mesa3d/src/gallium/drivers/freedreno/a6xx/
Dfd6_format.c394 fd6_pipe2swiz(unsigned swiz) in fd6_pipe2swiz() argument
396 switch (swiz) { in fd6_pipe2swiz()
408 fd6_tex_swiz(enum pipe_format format, unsigned char *swiz, in fd6_tex_swiz() argument
425 util_format_compose_swizzles(stencil_swiz, uswiz, swiz); in fd6_tex_swiz()
431 memcpy(swiz, uswiz, sizeof(uswiz)); in fd6_tex_swiz()
436 util_format_compose_swizzles(desc->swizzle, uswiz, swiz); in fd6_tex_swiz()
448 unsigned char swiz[4]; in fd6_tex_const_0() local
450 fd6_tex_swiz(format, swiz, in fd6_tex_const_0()
460 A6XX_TEX_CONST_0_SWIZ_X(fd6_pipe2swiz(swiz[0])) | in fd6_tex_const_0()
461 A6XX_TEX_CONST_0_SWIZ_Y(fd6_pipe2swiz(swiz[1])) | in fd6_tex_const_0()
[all …]
Dfd6_format.h41 enum a6xx_tex_swiz fd6_pipe2swiz(unsigned swiz);
43 void fd6_tex_swiz(enum pipe_format format, unsigned char *swiz,
/external/mesa3d/src/mesa/program/
Dprog_opt_constant_fold.c52 unsigned swiz; in src_reg_for_float() local
58 (gl_constant_value *) &val, 1, &swiz); in src_reg_for_float()
59 src.Swizzle = swiz; in src_reg_for_float()
67 unsigned swiz; in src_reg_for_vec4() local
73 (gl_constant_value *) val, 4, &swiz); in src_reg_for_vec4()
74 src.Swizzle = swiz; in src_reg_for_vec4()
/external/mesa3d/src/broadcom/compiler/
Dv3d_nir_lower_logic_ops.c100 v3d_nir_get_swizzled_channel(nir_builder *b, nir_ssa_def **srcs, int swiz) in v3d_nir_get_swizzled_channel() argument
102 switch (swiz) { in v3d_nir_get_swizzled_channel()
115 return srcs[swiz]; in v3d_nir_get_swizzled_channel()
121 const uint8_t *swiz, nir_pack_func pack_func) in v3d_nir_swizzle_and_pack() argument
125 c[i] = v3d_nir_get_swizzled_channel(b, chans, swiz[i]); in v3d_nir_swizzle_and_pack()
132 const uint8_t *swiz, nir_unpack_func unpack_func) in v3d_nir_unpack_and_swizzle() argument
142 c[i] = v3d_nir_get_swizzled_channel(b, unpacked_chans, swiz[i]); in v3d_nir_unpack_and_swizzle()
/external/mesa3d/src/compiler/spirv/
Dvtn_glsl450.c42 unsigned swiz[2] = {1, 0 }; in build_mat2_det() local
43 nir_ssa_def *p = nir_fmul(b, col[0], nir_swizzle(b, col[1], swiz, 2)); in build_mat2_det()
74 unsigned swiz[3]; in build_mat4_det() local
76 swiz[j] = j + (j >= i); in build_mat4_det()
79 subcol[0] = nir_swizzle(b, col[1], swiz, 3); in build_mat4_det()
80 subcol[1] = nir_swizzle(b, col[2], swiz, 3); in build_mat4_det()
81 subcol[2] = nir_swizzle(b, col[3], swiz, 3); in build_mat4_det()
124 unsigned swiz[NIR_MAX_VEC_COMPONENTS] = {0}; in build_mat_subdet() local
126 swiz[j] = j + (j >= row); in build_mat_subdet()
133 swiz, size - 1); in build_mat_subdet()
/external/llvm-project/llvm/test/CodeGen/Hexagon/vect/
Dshuff-32.ll4 ; CHECK: r0 = swiz(r0)
11 ; CHECK: r0 = swiz(r0)
18 ; CHECK: r0 = swiz(r0)
25 ; CHECK: r0 = swiz(r0)
/external/llvm-project/llvm/test/CodeGen/Hexagon/
Dbitmanip.ll92 ; CHECK: [[REG:r[0-9]+]] = swiz
100 ; CHECK: swiz
107 ; CHECK: swiz
108 ; CHECK: swiz

12345