/external/mesa3d/src/gallium/drivers/r300/compiler/ |
D | radeon_compiler_util.c | 38 unsigned int rc_swizzle_to_writemask(unsigned int swz) in rc_swizzle_to_writemask() argument 44 mask |= 1 << GET_SWZ(swz, i); in rc_swizzle_to_writemask() 51 rc_swizzle get_swz(unsigned int swz, rc_swizzle idx) in get_swz() argument 55 return GET_SWZ(swz, idx); in get_swz() 89 unsigned int combine_swizzles(unsigned int src, unsigned int swz) in combine_swizzles() argument 93 ret |= get_swz(src, GET_SWZ(swz, RC_SWIZZLE_X)); in combine_swizzles() 94 ret |= get_swz(src, GET_SWZ(swz, RC_SWIZZLE_Y)) << 3; in combine_swizzles() 95 ret |= get_swz(src, GET_SWZ(swz, RC_SWIZZLE_Z)) << 6; in combine_swizzles() 96 ret |= get_swz(src, GET_SWZ(swz, RC_SWIZZLE_W)) << 9; in combine_swizzles() 120 unsigned swz = GET_SWZ(swizzle, chan); in swizzle_mask() local [all …]
|
D | r300_fragprog_swizzle.c | 79 unsigned int swz = GET_SWZ(swizzle, comp); in lookup_native_swizzle() local 80 if (swz == RC_SWIZZLE_UNUSED) in lookup_native_swizzle() 82 if (swz != GET_SWZ(sd->hash, comp)) in lookup_native_swizzle() 123 unsigned int swz = GET_SWZ(reg.Swizzle, j); in r300_swizzle_is_native() local 124 if (swz == RC_SWIZZLE_UNUSED) in r300_swizzle_is_native() 126 if (swz != j) in r300_swizzle_is_native() 166 unsigned int swz; in r300_swizzle_split() local 169 swz = GET_SWZ(src.Swizzle, comp); in r300_swizzle_split() 170 if (swz == RC_SWIZZLE_UNUSED) in r300_swizzle_split() 172 if (swz == GET_SWZ(sd->hash, comp)) { in r300_swizzle_split() [all …]
|
D | radeon_optimize.c | 204 unsigned int swz = GET_SWZ(src.Swizzle, chan); in is_src_uniform_constant() local 205 if (swz < 4) { in is_src_uniform_constant() 209 if (swz == RC_SWIZZLE_UNUSED) in is_src_uniform_constant() 213 *pswz = swz; in is_src_uniform_constant() 217 if (swz != *pswz || *pnegate != GET_BIT(src.Negate, chan)) { in is_src_uniform_constant() 229 rc_swizzle swz = 0; in constant_folding_mad() local 232 if (is_src_uniform_constant(inst->U.I.SrcReg[2], &swz, &negate)) { in constant_folding_mad() 233 if (swz == RC_SWIZZLE_ZERO) { in constant_folding_mad() 239 if (is_src_uniform_constant(inst->U.I.SrcReg[1], &swz, &negate)) { in constant_folding_mad() 240 if (swz == RC_SWIZZLE_ONE) { in constant_folding_mad() [all …]
|
D | radeon_program_pair.c | 135 unsigned int swz, in pair_foreach_source_callback() argument 140 if(swz > 3) in pair_foreach_source_callback() 143 if(swz == RC_SWIZZLE_W) { in pair_foreach_source_callback() 194 unsigned int swz = RC_SWIZZLE_UNUSED; in rc_pair_foreach_source_that_rgb_reads() local 199 swz = GET_SWZ(pair->RGB.Arg[i].Swizzle, chan); in rc_pair_foreach_source_that_rgb_reads() 200 if(swz == RC_SWIZZLE_X || swz == RC_SWIZZLE_Y in rc_pair_foreach_source_that_rgb_reads() 201 || swz == RC_SWIZZLE_Z || swz == RC_SWIZZLE_W) in rc_pair_foreach_source_that_rgb_reads() 205 swz, in rc_pair_foreach_source_that_rgb_reads()
|
D | radeon_pair_translate.c | 137 unsigned int swz = GET_SWZ(src.Swizzle, j); in src_uses() local 138 if (swz < 3) in src_uses() 140 else if (swz < 4) in src_uses() 224 unsigned int swz = GET_SWZ(inst->SrcReg[i].Swizzle, j); in set_pair_instruction() local 226 if (swz < RC_SWIZZLE_W) in set_pair_instruction() 228 else if (swz == RC_SWIZZLE_W) in set_pair_instruction() 231 if (swz < RC_SWIZZLE_UNUSED) in set_pair_instruction() 250 unsigned int swz; in set_pair_instruction() local 252 swz = rc_get_scalar_src_swz(inst->SrcReg[i].Swizzle); in set_pair_instruction() 254 swz = GET_SWZ(inst->SrcReg[i].Swizzle, 3); in set_pair_instruction() [all …]
|
D | radeon_inline_literals.c | 110 unsigned swz, chan; in rc_inline_literals() local 113 swz = RC_SWIZZLE_UNUSED; in rc_inline_literals() 125 swz = GET_SWZ(src_reg->Swizzle, chan); in rc_inline_literals() 126 if (swz == RC_SWIZZLE_UNUSED) { in rc_inline_literals() 129 float_value = constant->u.Immediate[swz]; in rc_inline_literals()
|
D | radeon_program_constants.h | 120 #define GET_SWZ(swz, idx) (((swz) >> ((idx)*3)) & 0x7) argument 122 #define SET_SWZ(swz, idx, newv) \ argument 124 (swz) = ((swz) & ~(7 << ((idx)*3))) | ((newv) << ((idx)*3)); \
|
D | radeon_dataflow_swizzles.c | 104 unsigned new_swizzle, chan, swz0, swz1, swz2, swz3, found_swizzle, swz; in try_rewrite_constant() local 115 unsigned swz = GET_SWZ(reg->Swizzle, chan); in try_rewrite_constant() local 116 if (swz <= RC_SWIZZLE_W) { in try_rewrite_constant() 119 if (swz == RC_SWIZZLE_UNUSED) { in try_rewrite_constant() 128 swz = RC_SWIZZLE_UNUSED; in try_rewrite_constant() 139 if (swz == RC_SWIZZLE_UNUSED) { in try_rewrite_constant() 140 swz = chan_swz; in try_rewrite_constant() 141 } else if (swz != chan_swz) { in try_rewrite_constant()
|
D | r500_fragprog.c | 201 unsigned int swz = GET_SWZ(reg.Swizzle, i); in r500_swizzle_is_native() local 202 if (swz == RC_SWIZZLE_UNUSED) { in r500_swizzle_is_native() 206 if (swz >= 4) in r500_swizzle_is_native() 227 unsigned int swz = GET_SWZ(reg.Swizzle, i); in r500_swizzle_is_native() local 228 if (swz != RC_SWIZZLE_UNUSED && swz != RC_SWIZZLE_ZERO) in r500_swizzle_is_native() 251 unsigned int swz = GET_SWZ(src.Swizzle, i); in r500_swizzle_split() local 252 if (swz == RC_SWIZZLE_UNUSED || !GET_BIT(usemask, i)) in r500_swizzle_split()
|
D | radeon_compiler_util.h | 41 unsigned int rc_swizzle_to_writemask(unsigned int swz); 43 rc_swizzle get_swz(unsigned int swz, rc_swizzle idx); 51 unsigned int combine_swizzles(unsigned int src, unsigned int swz);
|
/external/mesa3d/src/mesa/program/ |
D | prog_parameter.c | 97 GLuint swz[4]; in lookup_parameter_constant() local 101 swz[j] = j; in lookup_parameter_constant() 107 swz[j] = k; in lookup_parameter_constant() 116 swz[j] = swz[j-1]; in lookup_parameter_constant() 120 *swizzleOut = MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); in lookup_parameter_constant() 322 GLuint swz = p->Size; /* 1, 2 or 3 for Y, Z, W */ in _mesa_add_typed_unnamed_constant() local 325 *swizzleOut = MAKE_SWIZZLE4(swz, swz, swz, swz); in _mesa_add_typed_unnamed_constant()
|
D | prog_instruction.h | 60 #define GET_SWZ(swz, idx) (((swz) >> ((idx)*3)) & 0x7) argument 63 #define HAS_EXTENDED_SWIZZLE(swz) (swz & 0x924) argument
|
/external/mesa3d/src/compiler/glsl/ |
D | opt_vectorize.cpp | 139 ir_swizzle *swz = (ir_swizzle *)ir; in rewrite_swizzle() local 140 if (swz->val->type->is_vector()) { in rewrite_swizzle() 141 swz->mask = *mask; in rewrite_swizzle() 143 swz->type = glsl_type::get_instance(swz->type->base_type, in rewrite_swizzle() 239 const ir_swizzle *swz) in write_mask_matches_swizzle() argument 241 return ((write_mask == WRITEMASK_X && swz->mask.x == SWIZZLE_X) || in write_mask_matches_swizzle() 242 (write_mask == WRITEMASK_Y && swz->mask.x == SWIZZLE_Y) || in write_mask_matches_swizzle() 243 (write_mask == WRITEMASK_Z && swz->mask.x == SWIZZLE_Z) || in write_mask_matches_swizzle() 244 (write_mask == WRITEMASK_W && swz->mask.x == SWIZZLE_W)); in write_mask_matches_swizzle()
|
/external/mesa3d/src/gallium/drivers/nouveau/nv30/ |
D | nv30_texture.c | 208 swizzle(const struct nv30_texfmt *fmt, unsigned cmp, unsigned swz) in swizzle() argument 210 uint32_t data = fmt->swz[swz].src << 8; in swizzle() 211 if (swz <= PIPE_SWIZZLE_W) in swizzle() 212 data |= fmt->swz[swz].cmp; in swizzle() 214 data |= fmt->swz[cmp].cmp; in swizzle() 258 so->swz = fmt->swizzle; in nv30_sampler_view_create() 259 so->swz |= swizzle(fmt, 3, tmpl->swizzle_a); in nv30_sampler_view_create() 260 so->swz |= swizzle(fmt, 0, tmpl->swizzle_r) << 2; in nv30_sampler_view_create() 261 so->swz |= swizzle(fmt, 1, tmpl->swizzle_g) << 4; in nv30_sampler_view_create() 262 so->swz |= swizzle(fmt, 2, tmpl->swizzle_b) << 6; in nv30_sampler_view_create() [all …]
|
D | nvfx_shader.h | 411 #define swz(s,x,y,z,w) nvfx_src_swz((s), NVFX_SWZ_##x, NVFX_SWZ_##y, NVFX_SWZ_##z, NVFX_SWZ_##w) macro 428 uint8_t swz[4]; member 486 .swz = { 0, 1, 2, 3 }, in nvfx_src() 497 dst.swz[NVFX_SWZ_X] = src.swz[x]; in nvfx_src_swz() 498 dst.swz[NVFX_SWZ_Y] = src.swz[y]; in nvfx_src_swz() 499 dst.swz[NVFX_SWZ_Z] = src.swz[z]; in nvfx_src_swz() 500 dst.swz[NVFX_SWZ_W] = src.swz[w]; in nvfx_src_swz()
|
D | nvfx_fragprog.c | 154 sr |= ((src.swz[0] << NVFX_FP_REG_SWZ_X_SHIFT) | in emit_src() 155 (src.swz[1] << NVFX_FP_REG_SWZ_Y_SHIFT) | in emit_src() 156 (src.swz[2] << NVFX_FP_REG_SWZ_Z_SHIFT) | in emit_src() 157 (src.swz[3] << NVFX_FP_REG_SWZ_W_SHIFT)); in emit_src() 408 src.swz[0] = fsrc->Register.SwizzleX; in tgsi_src() 409 src.swz[1] = fsrc->Register.SwizzleY; in tgsi_src() 410 src.swz[2] = fsrc->Register.SwizzleZ; in tgsi_src() 411 src.swz[3] = fsrc->Register.SwizzleW; in tgsi_src() 484 addend.swz[0] = fsrc->Register.SwizzleX; in nvfx_fragprog_parse_instruction() 485 addend.swz[1] = fsrc->Register.SwizzleY; in nvfx_fragprog_parse_instruction() [all …]
|
D | nvfx_vertprog.c | 164 sr |= ((src.swz[0] << NVFX_VP(SRC_SWZ_X_SHIFT)) | in emit_src() 165 (src.swz[1] << NVFX_VP(SRC_SWZ_Y_SHIFT)) | in emit_src() 166 (src.swz[2] << NVFX_VP(SRC_SWZ_Z_SHIFT)) | in emit_src() 167 (src.swz[3] << NVFX_VP(SRC_SWZ_W_SHIFT))); in emit_src() 396 src.swz[0] = fsrc->Register.SwizzleX; in tgsi_src() 397 src.swz[1] = fsrc->Register.SwizzleY; in tgsi_src() 398 src.swz[2] = fsrc->Register.SwizzleZ; in tgsi_src() 399 src.swz[3] = fsrc->Register.SwizzleW; in tgsi_src() 583 …nvfx_vp_emit(vpc, arith(sat, VEC, ADD, dst, mask, swz(tmp, X, X, X, X), none, swz(tmp, Y, Y, Y, Y)… in nvfx_vertprog_parse_instruction() 639 …nvfx_vp_emit(vpc, arith(0, SCA, LG2, tmp.reg, NVFX_VP_MASK_X, none, none, swz(src[0], X, X, X, X))… in nvfx_vertprog_parse_instruction() [all …]
|
/external/virglrenderer/src/gallium/auxiliary/util/ |
D | u_format.c | 411 const unsigned char swz[4], in util_format_apply_color_swizzle() 418 switch (swz[c]) { in util_format_apply_color_swizzle() 424 dst->ui[c] = (swz[c] == PIPE_SWIZZLE_ONE) ? 1 : 0; in util_format_apply_color_swizzle() 430 switch (swz[c]) { in util_format_apply_color_swizzle() 436 dst->f[c] = (swz[c] == PIPE_SWIZZLE_ONE) ? 1.0f : 0.0f; in util_format_apply_color_swizzle() 444 const unsigned char swz[4]) in util_format_swizzle_4f() 449 if (swz[i] <= UTIL_FORMAT_SWIZZLE_W) in util_format_swizzle_4f() 450 dst[i] = src[swz[i]]; in util_format_swizzle_4f() 451 else if (swz[i] == UTIL_FORMAT_SWIZZLE_0) in util_format_swizzle_4f() 453 else if (swz[i] == UTIL_FORMAT_SWIZZLE_1) in util_format_swizzle_4f() [all …]
|
/external/mesa3d/src/intel/compiler/ |
D | brw_reg.h | 76 #define BRW_GET_SWZ(swz, idx) (((swz) >> ((idx)*2)) & 0x3) argument 129 brw_apply_swizzle_to_mask(unsigned swz, unsigned mask) in brw_apply_swizzle_to_mask() argument 134 if (mask & (1 << BRW_GET_SWZ(swz, i))) in brw_apply_swizzle_to_mask() 147 brw_apply_inv_swizzle_to_mask(unsigned swz, unsigned mask) in brw_apply_inv_swizzle_to_mask() argument 153 result |= 1 << BRW_GET_SWZ(swz, i); in brw_apply_inv_swizzle_to_mask() 176 unsigned swz[4]; in brw_swizzle_for_mask() local 179 last = swz[i] = (mask & (1 << i) ? i : last); in brw_swizzle_for_mask() 181 return BRW_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); in brw_swizzle_for_mask() 201 brw_mask_for_swizzle(unsigned swz) in brw_mask_for_swizzle() argument 203 return brw_apply_inv_swizzle_to_mask(swz, ~0); in brw_mask_for_swizzle() [all …]
|
/external/deqp/external/vulkancts/modules/vulkan/pipeline/ |
D | vktPipelineImageSamplingInstance.cpp | 889 …r<ScalarType, 4> swizzle (const tcu::Vector<ScalarType, 4>& vec, const vk::VkComponentMapping& swz) in swizzle() argument 891 return tcu::Vector<ScalarType, 4>(getSwizzledComp(vec, swz.r, 0), in swizzle() 892 getSwizzledComp(vec, swz.g, 1), in swizzle() 893 getSwizzledComp(vec, swz.b, 2), in swizzle() 894 getSwizzledComp(vec, swz.a, 3)); in swizzle() 905 tcu::Vec4 swizzleScaleBias (const tcu::Vec4& vec, const vk::VkComponentMapping& swz, float zeroOrOn… in swizzleScaleBias() argument 911 swz.r == VK_COMPONENT_SWIZZLE_IDENTITY ? VK_COMPONENT_SWIZZLE_R : swz.r, in swizzleScaleBias() 912 swz.g == VK_COMPONENT_SWIZZLE_IDENTITY ? VK_COMPONENT_SWIZZLE_G : swz.g, in swizzleScaleBias() 913 swz.b == VK_COMPONENT_SWIZZLE_IDENTITY ? VK_COMPONENT_SWIZZLE_B : swz.b, in swizzleScaleBias() 914 swz.a == VK_COMPONENT_SWIZZLE_IDENTITY ? VK_COMPONENT_SWIZZLE_A : swz.a in swizzleScaleBias() [all …]
|
/external/mesa3d/src/gallium/drivers/nouveau/nv50/ |
D | nv50_tex.c | 31 nv50_tic_swizzle(const struct nv50_format *fmt, unsigned swz, bool tex_int) in nv50_tic_swizzle() argument 33 switch (swz) { in nv50_tic_swizzle() 71 uint32_t swz[4]; in nv50_create_texture_view() local 100 swz[0] = nv50_tic_swizzle(fmt, view->pipe.swizzle_r, tex_int); in nv50_create_texture_view() 101 swz[1] = nv50_tic_swizzle(fmt, view->pipe.swizzle_g, tex_int); in nv50_create_texture_view() 102 swz[2] = nv50_tic_swizzle(fmt, view->pipe.swizzle_b, tex_int); in nv50_create_texture_view() 103 swz[3] = nv50_tic_swizzle(fmt, view->pipe.swizzle_a, tex_int); in nv50_create_texture_view() 109 (swz[0] << G80_TIC_0_X_SOURCE__SHIFT) | in nv50_create_texture_view() 110 (swz[1] << G80_TIC_0_Y_SOURCE__SHIFT) | in nv50_create_texture_view() 111 (swz[2] << G80_TIC_0_Z_SOURCE__SHIFT) | in nv50_create_texture_view() [all …]
|
/external/mesa3d/src/gallium/auxiliary/util/ |
D | u_format.c | 821 const unsigned char swz[4], in util_format_apply_color_swizzle() 828 switch (swz[c]) { in util_format_apply_color_swizzle() 834 dst->ui[c] = (swz[c] == PIPE_SWIZZLE_1) ? 1 : 0; in util_format_apply_color_swizzle() 840 switch (swz[c]) { in util_format_apply_color_swizzle() 846 dst->f[c] = (swz[c] == PIPE_SWIZZLE_1) ? 1.0f : 0.0f; in util_format_apply_color_swizzle() 854 const unsigned char swz[4]) in pipe_swizzle_4f() 859 if (swz[i] <= PIPE_SWIZZLE_W) in pipe_swizzle_4f() 860 dst[i] = src[swz[i]]; in pipe_swizzle_4f() 861 else if (swz[i] == PIPE_SWIZZLE_0) in pipe_swizzle_4f() 863 else if (swz[i] == PIPE_SWIZZLE_1) in pipe_swizzle_4f() [all …]
|
/external/swiftshader/third_party/LLVM/test/CodeGen/X86/ |
D | vec_compare-2.ll | 23 …%swz.i.i28.i = shufflevector <4 x i32> %conv.i.i15.i, <4 x i32> undef, <2 x i32> <i32 0, i32 1> ; … 24 %tmp6.i29.i = bitcast <2 x i32> %swz.i.i28.i to <4 x i16> ; <<4 x i16>> [#uses=1] 25 …%swz.i30.i = shufflevector <4 x i16> %tmp6.i29.i, <4 x i16> undef, <2 x i32> <i32 0, i32 1> ; <<2 … 26 store <2 x i16> %swz.i30.i, <2 x i16>* undef
|
/external/mesa3d/src/mesa/state_tracker/ |
D | st_sampler_view.c | 251 unsigned i, swz[4]; in swizzle_swizzle() local 265 swz[i] = GET_SWZ(swizzle2, s); in swizzle_swizzle() 268 swz[i] = SWIZZLE_ZERO; in swizzle_swizzle() 271 swz[i] = SWIZZLE_ONE; in swizzle_swizzle() 275 swz[i] = SWIZZLE_X; in swizzle_swizzle() 279 return MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); in swizzle_swizzle()
|
/external/mesa3d/src/amd/vulkan/ |
D | vk_format.h | 296 const unsigned char swz[4], in vk_format_compose_swizzles() 299 dst[0] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_R, swz, mapping->r); in vk_format_compose_swizzles() 300 dst[1] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_G, swz, mapping->g); in vk_format_compose_swizzles() 301 dst[2] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_B, swz, mapping->b); in vk_format_compose_swizzles() 302 dst[3] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_A, swz, mapping->a); in vk_format_compose_swizzles()
|