/third_party/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 | 139 unsigned int swz = GET_SWZ(src.Swizzle, j); in src_uses() local 140 if (swz < 3) in src_uses() 142 else if (swz < 4) in src_uses() 226 unsigned int swz = GET_SWZ(inst->SrcReg[i].Swizzle, j); in set_pair_instruction() local 228 if (swz < RC_SWIZZLE_W) in set_pair_instruction() 230 else if (swz == RC_SWIZZLE_W) in set_pair_instruction() 233 if (swz < RC_SWIZZLE_UNUSED) in set_pair_instruction() 252 unsigned int swz; in set_pair_instruction() local 254 swz = rc_get_scalar_src_swz(inst->SrcReg[i].Swizzle); in set_pair_instruction() 256 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 | 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);
|
D | r500_fragprog.c | 202 unsigned int swz = GET_SWZ(reg.Swizzle, i); in r500_swizzle_is_native() local 203 if (swz == RC_SWIZZLE_UNUSED) { in r500_swizzle_is_native() 207 if (swz >= 4) in r500_swizzle_is_native() 226 unsigned int swz = GET_SWZ(reg.Swizzle, i); in r500_swizzle_is_native() local 227 if (swz != RC_SWIZZLE_UNUSED && swz != RC_SWIZZLE_ZERO) in r500_swizzle_is_native() 250 unsigned int swz = GET_SWZ(src.Swizzle, i); in r500_swizzle_split() local 251 if (swz == RC_SWIZZLE_UNUSED || !GET_BIT(usemask, i)) in r500_swizzle_split()
|
/third_party/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()
|
/third_party/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() 259 so->swz = fmt->swizzle; in nv30_sampler_view_create() 260 so->swz |= swizzle(fmt, 3, tmpl->swizzle_a); in nv30_sampler_view_create() 261 so->swz |= swizzle(fmt, 0, tmpl->swizzle_r) << 2; in nv30_sampler_view_create() 262 so->swz |= swizzle(fmt, 1, tmpl->swizzle_g) << 4; in nv30_sampler_view_create() 263 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 …]
|
/third_party/mesa3d/src/mesa/program/ |
D | prog_parameter.c | 99 GLuint swz[4]; in lookup_parameter_constant() local 103 swz[j] = j; in lookup_parameter_constant() 109 swz[j] = k; in lookup_parameter_constant() 118 swz[j] = swz[j-1]; in lookup_parameter_constant() 122 *swizzleOut = MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); in lookup_parameter_constant() 401 GLuint swz = p->Size; /* 1, 2 or 3 for Y, Z, W */ in _mesa_add_typed_unnamed_constant() local 404 *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
|
/third_party/mesa3d/src/gallium/drivers/crocus/ |
D | crocus_resource.h | 47 unsigned swz = (pswz + 4) & 7; in pipe_to_isl_swizzle() local 49 return (green_to_blue && swz == ISL_CHANNEL_SELECT_GREEN) ? ISL_CHANNEL_SELECT_BLUE : swz; in pipe_to_isl_swizzle() 55 struct isl_swizzle swz; in pipe_to_isl_swizzles() local 56 swz.r = pipe_to_isl_swizzle(pswz[0], false); in pipe_to_isl_swizzles() 57 swz.g = pipe_to_isl_swizzle(pswz[1], false); in pipe_to_isl_swizzles() 58 swz.b = pipe_to_isl_swizzle(pswz[2], false); in pipe_to_isl_swizzles() 59 swz.a = pipe_to_isl_swizzle(pswz[3], false); in pipe_to_isl_swizzles() 60 return swz; in pipe_to_isl_swizzles()
|
/third_party/mesa3d/src/gallium/drivers/r600/sfn/ |
D | sfn_value_gpr.h | 90 void swizzle(const Swizzle& swz); 191 GPRVector::Swizzle swz = {0,1,2,3}; in swizzle_from_comps() local 193 swz[i] = 7; in swizzle_from_comps() 194 return swz; in swizzle_from_comps() 199 GPRVector::Swizzle swz; in swizzle_from_mask() local 201 swz[i] = ((1 << i) & mask) ? i : 7; in swizzle_from_mask() 202 return swz; in swizzle_from_mask()
|
/third_party/mesa3d/src/freedreno/ir3/ |
D | ir3_lower_subgroups.c | 228 struct ir3_instruction *swz = in lower_block() local 230 ir3_dst_create(swz, instr->dsts[0]->num, instr->dsts[0]->flags); in lower_block() 231 ir3_dst_create(swz, instr->dsts[1]->num, instr->dsts[1]->flags); in lower_block() 232 ir3_src_create(swz, instr->srcs[0]->num, instr->srcs[0]->flags); in lower_block() 233 ir3_src_create(swz, instr->srcs[1]->num, instr->srcs[1]->flags); in lower_block() 234 swz->cat1.dst_type = swz->cat1.src_type = TYPE_U32; in lower_block() 235 swz->repeat = 1; in lower_block()
|
/third_party/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 …]
|
D | brw_vec4_copy_propagation.cpp | 89 unsigned swz[4] = {}; in get_copy_value() local 98 swz[i] = i; in get_copy_value() 100 swz[i] = BRW_GET_SWZ(src.swizzle, i); in get_copy_value() 121 BRW_SWIZZLE4(swz[0], swz[1], in get_copy_value() 122 swz[2], swz[3]))); in get_copy_value()
|
/third_party/vk-gl-cts/external/vulkancts/modules/vulkan/pipeline/ |
D | vktPipelineImageSamplingInstance.cpp | 1006 …r<ScalarType, 4> swizzle (const tcu::Vector<ScalarType, 4>& vec, const vk::VkComponentMapping& swz) in swizzle() argument 1008 return tcu::Vector<ScalarType, 4>(getSwizzledComp(vec, swz.r, 0), in swizzle() 1009 getSwizzledComp(vec, swz.g, 1), in swizzle() 1010 getSwizzledComp(vec, swz.b, 2), in swizzle() 1011 getSwizzledComp(vec, swz.a, 3)); in swizzle() 1022 tcu::Vec4 swizzleScaleBias (const tcu::Vec4& vec, const vk::VkComponentMapping& swz, float zeroOrOn… in swizzleScaleBias() argument 1028 swz.r == VK_COMPONENT_SWIZZLE_IDENTITY ? VK_COMPONENT_SWIZZLE_R : swz.r, in swizzleScaleBias() 1029 swz.g == VK_COMPONENT_SWIZZLE_IDENTITY ? VK_COMPONENT_SWIZZLE_G : swz.g, in swizzleScaleBias() 1030 swz.b == VK_COMPONENT_SWIZZLE_IDENTITY ? VK_COMPONENT_SWIZZLE_B : swz.b, in swizzleScaleBias() 1031 swz.a == VK_COMPONENT_SWIZZLE_IDENTITY ? VK_COMPONENT_SWIZZLE_A : swz.a in swizzleScaleBias() [all …]
|
/third_party/mesa3d/src/amd/vulkan/ |
D | vk_format.h | 103 vk_format_compose_swizzles(const VkComponentMapping *mapping, const unsigned char swz[4], in vk_format_compose_swizzles() 106 dst[0] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_R, swz, mapping->r); in vk_format_compose_swizzles() 107 dst[1] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_G, swz, mapping->g); in vk_format_compose_swizzles() 108 dst[2] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_B, swz, mapping->b); in vk_format_compose_swizzles() 109 dst[3] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_A, swz, mapping->a); in vk_format_compose_swizzles()
|
/third_party/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() 70 uint32_t swz[4]; in nv50_create_texture_view() local 99 swz[0] = nv50_tic_swizzle(fmt, view->pipe.swizzle_r, tex_int); in nv50_create_texture_view() 100 swz[1] = nv50_tic_swizzle(fmt, view->pipe.swizzle_g, tex_int); in nv50_create_texture_view() 101 swz[2] = nv50_tic_swizzle(fmt, view->pipe.swizzle_b, tex_int); in nv50_create_texture_view() 102 swz[3] = nv50_tic_swizzle(fmt, view->pipe.swizzle_a, tex_int); in nv50_create_texture_view() 108 (swz[0] << G80_TIC_0_X_SOURCE__SHIFT) | in nv50_create_texture_view() 109 (swz[1] << G80_TIC_0_Y_SOURCE__SHIFT) | in nv50_create_texture_view() 110 (swz[2] << G80_TIC_0_Z_SOURCE__SHIFT) | in nv50_create_texture_view() [all …]
|
/third_party/vk-gl-cts/modules/gles3/functional/ |
D | es3fTextureSwizzleTests.cpp | 49 static int swizzle (const tcu::RGBA& c, deUint32 swz) in swizzle() argument 51 switch (swz) in swizzle() 312 deUint32 swz = swizzles[swzNdx].swizzle; in init() local 313 deUint32 swzR = (chanNdx == 0) ? swz : defaultSwizzles[0]; in init() 314 deUint32 swzG = (chanNdx == 1) ? swz : defaultSwizzles[1]; in init() 315 deUint32 swzB = (chanNdx == 2) ? swz : defaultSwizzles[2]; in init() 316 deUint32 swzA = (chanNdx == 3) ? swz : defaultSwizzles[3]; in init()
|