/third_party/mesa3d/src/compiler/glsl/ |
D | opt_swizzle.cpp | 61 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 …]
|
D | opt_constant_propagation.cpp | 158 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()
|
D | hir_field_selection.cpp | 60 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()
|
D | ir_builder_print_visitor.cpp | 115 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 …]
|
D | opt_constant_folding.cpp | 84 ir_swizzle *swiz = (*rvalue)->as_swizzle(); in ir_constant_fold() local 85 if (swiz && !swiz->val->as_constant()) in ir_constant_fold()
|
D | opt_copy_propagation_elements.cpp | 690 ir_swizzle *swiz = ir->rhs->as_swizzle(); in add_copy() local 691 if (!swiz) in add_copy() 694 rhs = swiz->val->as_dereference_variable(); in add_copy() 698 orig_swizzle[0] = swiz->mask.x; in add_copy() 699 orig_swizzle[1] = swiz->mask.y; in add_copy() 700 orig_swizzle[2] = swiz->mask.z; in add_copy() 701 orig_swizzle[3] = swiz->mask.w; in add_copy()
|
/third_party/mesa3d/src/gallium/drivers/freedreno/a6xx/ |
D | fd6_format.c | 35 fd6_pipe2swiz(unsigned swiz) in fd6_pipe2swiz() argument 37 switch (swiz) { in fd6_pipe2swiz() 55 fd6_tex_swiz(enum pipe_format format, enum a6xx_tile_mode tile_mode, unsigned char *swiz, unsigned … in fd6_tex_swiz() argument 67 util_format_compose_swizzles(stencil_swiz, uswiz, swiz); in fd6_tex_swiz() 70 util_format_compose_swizzles(fswiz, uswiz, swiz); in fd6_tex_swiz() 76 memcpy(swiz, uswiz, sizeof(uswiz)); in fd6_tex_swiz() 81 util_format_compose_swizzles(desc->swizzle, uswiz, swiz); in fd6_tex_swiz() 92 unsigned char swiz[4]; in fd6_tex_const_0() local 94 fd6_tex_swiz(format, rsc->layout.tile_mode, swiz, swizzle_r, swizzle_g, swizzle_b, swizzle_a); in fd6_tex_const_0() 101 A6XX_TEX_CONST_0_SWIZ_X(fd6_pipe2swiz(swiz[0])) | in fd6_tex_const_0() [all …]
|
D | fd6_format.h | 37 enum a6xx_tex_swiz fd6_pipe2swiz(unsigned swiz); 39 void fd6_tex_swiz(enum pipe_format format, enum a6xx_tile_mode tile_mode, unsigned char *swiz,
|
/third_party/mesa3d/src/gallium/drivers/vc4/ |
D | vc4_nir_lower_io.c | 96 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 …]
|
/third_party/mesa3d/src/gallium/drivers/freedreno/a2xx/ |
D | fd2_util.c | 191 tex_swiz(unsigned swiz) in tex_swiz() argument 193 switch (swiz) { in tex_swiz() 215 unsigned char swiz[4] = { in fd2_tex_swiz() local 222 util_format_compose_swizzles(desc->swizzle, swiz, rswiz); in fd2_tex_swiz() 234 unsigned char swiz[4], rswiz[4]; in fd2_vtx_swiz() local 237 swiz[i] = (swizzle >> i * 3) & 7; in fd2_vtx_swiz() 239 util_format_compose_swizzles(desc->swizzle, swiz, rswiz); in fd2_vtx_swiz()
|
D | ir2_private.h | 314 swiz_get(unsigned swiz, unsigned i) in swiz_get() argument 316 return ((swiz >> i * 2) + i) & 3; in swiz_get() 322 unsigned swiz = 0; in swiz_merge() local 324 swiz |= swiz_set(swiz_get(swiz0, swiz_get(swiz1, i)), i); in swiz_merge() 325 return swiz; in swiz_merge() 331 unsigned swiz = 0; in swiz_merge_p() local 333 swiz |= swiz_set(swiz_get(*swiz0, swiz_get(swiz1, i)), i); in swiz_merge_p() 334 *swiz0 = swiz; in swiz_merge_p()
|
D | ir2_assemble.c | 33 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() 67 unsigned swiz = 0; in alu_swizzle() local 85 swiz |= swiz_set(i, comp[j].c); in alu_swizzle() 89 return swiz_merge(swiz0, swiz); in alu_swizzle() 122 unsigned swiz = 0; in fetch_swizzle() local 124 swiz |= swiz_get(alu_swiz, i) << i * 2; in fetch_swizzle() 125 return swiz; in fetch_swizzle()
|
/third_party/skia/src/gpu/ |
D | GrSwizzle.cpp | 39 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()
|
/third_party/mesa3d/src/freedreno/vulkan/ |
D | tu_image.c | 86 compose_swizzle(unsigned char *swiz, const VkComponentMapping *mapping) in compose_swizzle() argument 88 unsigned char src_swiz[4] = { swiz[0], swiz[1], swiz[2], swiz[3] }; in compose_swizzle() 95 swiz[i] = src_swiz[i]; in compose_swizzle() 98 swiz[i] = src_swiz[vk_swiz[i] - VK_COMPONENT_SWIZZLE_R]; in compose_swizzle() 101 swiz[i] = A6XX_TEX_ZERO; in compose_swizzle() 104 swiz[i] = A6XX_TEX_ONE; in compose_swizzle() 119 unsigned char swiz[4] = { in tu6_texswiz() local 128 swiz[0] = A6XX_TEX_Z; in tu6_texswiz() 129 swiz[1] = A6XX_TEX_X; in tu6_texswiz() 130 swiz[2] = A6XX_TEX_Y; in tu6_texswiz() [all …]
|
/third_party/mesa3d/src/gallium/drivers/etnaviv/ |
D | etnaviv_disasm.c | 292 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 …]
|
D | etnaviv_compiler_nir.h | 98 update_swiz_mask(nir_alu_instr *alu, nir_dest *dest, unsigned *swiz, unsigned *mask) in update_swiz_mask() argument 100 if (!swiz) in update_swiz_mask() 114 swizzle |= (*swiz >> src_swiz * 2 & 3) << i * 2; in update_swiz_mask() 119 *swiz = swizzle; in update_swiz_mask() 124 real_dest(nir_dest *dest, unsigned *swiz, unsigned *mask) in real_dest() argument 167 update_swiz_mask(alu, dest, swiz, mask); in real_dest() 180 update_swiz_mask(alu, NULL, swiz, mask); in real_dest() 189 return real_dest(&alu->dest.dest, swiz, mask); in real_dest()
|
D | etnaviv_compiler_nir_emit.c | 157 src[0].swiz = inst_swiz_compose(src[0].swiz, swiz_scalar); in etna_emit_alu() 158 src[1].swiz = inst_swiz_compose(src[1].swiz, swiz_scalar); in etna_emit_alu() 202 .tex.swiz = dst_swiz, in etna_emit_tex() 238 inst.src[0].swiz = INST_SWIZ_BROADCAST(inst.src[0].swiz & 3); in etna_emit_jump() 256 inst.src[0].swiz = INST_SWIZ_BROADCAST(inst.src[0].swiz & 3); in etna_emit_discard()
|
D | etnaviv_asm.c | 82 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()
|
D | etnaviv_format.c | 324 unsigned char swiz[4] = { in get_texture_swiz() local 331 if (swiz[i] == PIPE_SWIZZLE_Y || swiz[i] == PIPE_SWIZZLE_Z) in get_texture_swiz() 332 swiz[i] = PIPE_SWIZZLE_0; in get_texture_swiz() 344 return VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_R(swiz[0]) | in get_texture_swiz() 345 VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_G(swiz[1]) | in get_texture_swiz() 346 VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_B(swiz[2]) | in get_texture_swiz() 347 VIVS_TE_SAMPLER_CONFIG1_SWIZZLE_A(swiz[3]); in get_texture_swiz()
|
/third_party/flutter/skia/src/gpu/ |
D | GrSwizzle.h | 153 char swiz[4]{}; in Concat() 157 case CToI('0'): swiz[i] = '0'; break; in Concat() 158 case CToI('1'): swiz[i] = '1'; break; in Concat() 159 default: swiz[i] = a.fSwiz[idx]; break; in Concat() 162 return GrSwizzle(swiz); in Concat()
|
/third_party/mesa3d/src/mesa/state_tracker/ |
D | st_tgsi_lower_yuv.c | 71 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 …]
|
D | st_nir_lower_builtin.c | 222 unsigned swiz[NIR_MAX_VEC_COMPONENTS] = {0}; in lower_builtin_block() local 224 swiz[i] = GET_SWZ(element->swizzle, i); in lower_builtin_block() 225 assert(swiz[i] <= SWIZZLE_W); in lower_builtin_block() 227 def = nir_swizzle(b, def, swiz, intrin->num_components); in lower_builtin_block()
|
/third_party/mesa3d/src/mesa/program/ |
D | prog_opt_constant_fold.c | 52 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()
|
/third_party/mesa3d/src/broadcom/compiler/ |
D | v3d_nir_lower_logic_ops.c | 100 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()
|
/third_party/mesa3d/src/compiler/spirv/ |
D | vtn_glsl450.c | 42 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()
|