Home
last modified time | relevance | path

Searched refs:swz (Results 1 - 25 of 109) sorted by relevance

12345

/third_party/mesa3d/src/gallium/drivers/r300/compiler/
H A Dradeon_compiler_util.c38 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 in swizzle_mask() local
242 unsigned int swz = GET_SWZ(conversion_swizzle, i); rc_normal_rewrite_writemask() local
276 unsigned int swz = GET_SWZ(swizzle, chan); rc_rewrite_swizzle() local
302 rc_swizzle swz = GET_SWZ(swizzle, i); lmul_swizzle() local
340 unsigned int swz = RC_SWIZZLE_UNUSED; rc_source_type_swz() local
698 int swz = GET_SWZ(swizzle, chan); rc_get_constant_value() local
717 unsigned int swz, chan; rc_get_scalar_src_swz() local
[all...]
H A Dr300_fragprog_swizzle.c79 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 in r300_swizzle_split()
231 unsigned int swz = GET_SWZ(swizzle, 0); r300FPTranslateAlphaSwizzle() local
[all...]
H A Dradeon_optimize.c206 unsigned int swz = GET_SWZ(src.Swizzle, chan); in is_src_uniform_constant() local
207 if (swz < 4) { in is_src_uniform_constant()
211 if (swz == RC_SWIZZLE_UNUSED) in is_src_uniform_constant()
215 *pswz = swz; in is_src_uniform_constant()
219 if (swz != *pswz || *pnegate != GET_BIT(src.Negate, chan)) { in is_src_uniform_constant()
231 rc_swizzle swz = 0; in constant_folding_mad() local
234 if (is_src_uniform_constant(inst->U.I.SrcReg[2], &swz, &negate)) { in constant_folding_mad()
235 if (swz == RC_SWIZZLE_ZERO) { in constant_folding_mad()
241 if (is_src_uniform_constant(inst->U.I.SrcReg[1], &swz, &negate)) { in constant_folding_mad()
242 if (swz in constant_folding_mad()
272 rc_swizzle swz = 0; constant_folding_mul() local
305 rc_swizzle swz = 0; constant_folding_add() local
364 unsigned int swz = GET_SWZ(newsrc.Swizzle, chan); constant_folding() local
441 unsigned int swz = GET_SWZ(src.Swizzle, chan); src_has_const_swz() local
560 rc_swizzle swz = is_presub_candidate() local
652 unsigned int i, swz; peephole_add_presub_inv() local
726 unsigned int chan = 0, swz, i; peephole_mul_omod() local
892 unsigned int swz = GET_SWZ(swz1, chan); merge_swizzles() local
[all...]
H A Dradeon_pair_translate.c139 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 in set_pair_instruction()
[all...]
H A Dradeon_program_pair.c135 unsigned int swz, in pair_foreach_source_callback()
138 /* swz > 3 means that the swizzle is either not used, or a constant in pair_foreach_source_callback()
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 in rc_pair_foreach_source_that_rgb_reads()
131 pair_foreach_source_callback( struct rc_pair_instruction * pair, void * data, rc_pair_foreach_src_fn cb, unsigned int swz, unsigned int src) pair_foreach_source_callback() argument
[all...]
H A Dradeon_inline_literals.c110 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()
130 if (swz >= RC_SWIZZLE_ZERO) { in rc_inline_literals()
134 float_value = constant->u.Immediate[swz]; in rc_inline_literals()
H A Dradeon_program_constants.h125 #define GET_SWZ(swz, idx) (((swz) >> ((idx)*3)) & 0x7)
127 #define SET_SWZ(swz, idx, newv) \
129 (swz) = ((swz) & ~(7 << ((idx)*3))) | ((newv) << ((idx)*3)); \
H A Dradeon_dataflow_swizzles.c98 unsigned new_swizzle, chan, swz0, swz1, swz2, swz3, found_swizzle, swz; in try_rewrite_constant() local
110 unsigned swz = GET_SWZ(reg->Swizzle, chan); in try_rewrite_constant() local
111 if (swz <= RC_SWIZZLE_W) { in try_rewrite_constant()
114 if (swz == RC_SWIZZLE_UNUSED) { in try_rewrite_constant()
123 swz = RC_SWIZZLE_UNUSED; in try_rewrite_constant()
134 if (swz == RC_SWIZZLE_UNUSED) { in try_rewrite_constant()
135 swz = chan_swz; in try_rewrite_constant()
136 } else if (swz != chan_swz) { in try_rewrite_constant()
/third_party/astc-encoder/Source/
H A Dastcenc_image.cpp92 * @param swz The swizzle to use.
96 const astcenc_swizzle& swz in swz_texel_skip()
98 (void)swz; in swz_texel_skip()
106 * @param swz The swizzle to use.
110 const astcenc_swizzle& swz in swz_texel()
118 return vfloat4(datas[swz.r], datas[swz.g], datas[swz.b], datas[swz.a]); in swz_texel()
159 const astcenc_swizzle& swz in load_image_block()
[all...]
H A Dastcenc_compute_variance.cpp109 astcenc_swizzle swz = arg.swz; in compute_pixel_region_variance() local
182 uint8_t r = data[swz.r]; in compute_pixel_region_variance()
183 uint8_t g = data[swz.g]; in compute_pixel_region_variance()
184 uint8_t b = data[swz.b]; in compute_pixel_region_variance()
185 uint8_t a = data[swz.a]; in compute_pixel_region_variance()
226 vint4 di(data[swz.r], data[swz.g], data[swz.b], data[swz in compute_pixel_region_variance()
423 init_compute_averages( const astcenc_image& img, unsigned int alpha_kernel_radius, const astcenc_swizzle& swz, avg_args& ag ) init_compute_averages() argument
[all...]
H A Dastcenc_averages_and_directions.cpp59 averages[0] = blk.data_mean.swz<0, 1, 2>(); in compute_partition_averages_rgb()
86 vfloat4 block_total = blk.data_mean.swz<0, 1, 2>() * static_cast<float>(blk.texel_count); in compute_partition_averages_rgb()
126 vfloat4 block_total = blk.data_mean.swz<0, 1, 2>() * static_cast<float>(blk.texel_count); in compute_partition_averages_rgb()
175 vfloat4 block_total = blk.data_mean.swz<0, 1, 2>() * static_cast<float>(blk.texel_count); in compute_partition_averages_rgb()
422 vmask4 tdm0 = texel_datum.swz<0,0,0,0>() > zero;
425 vmask4 tdm1 = texel_datum.swz<1,1,1,1>() > zero;
428 vmask4 tdm2 = texel_datum.swz<2,2,2,2>() > zero;
431 vmask4 tdm3 = texel_datum.swz<3,3,3,3>() > zero;
476 partition_averages[0] = partition_averages[0].swz<1, 2, 3>();
477 partition_averages[1] = partition_averages[1].swz<
[all...]
/third_party/mesa3d/src/gallium/drivers/nouveau/nv30/
H A Dnv30_texture.c208 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 | in nv30_sampler_view_create()
[all...]
H A Dnvfx_shader.h411 #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_ in nvfx_src_swz()
[all...]
H A Dnvfx_fragprog.c154 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[ in nvfx_fragprog_parse_instruction()
[all...]
/third_party/mesa3d/src/panfrost/bifrost/valhall/
H A Dva_lower_constants.c190 enum bi_swizzle swz = I->src[s].swizzle; in va_lower_constants() local
197 if (swz == BI_SWIZZLE_H00) in va_lower_constants()
199 else if (swz == BI_SWIZZLE_H11) in va_lower_constants()
202 assert(swz == BI_SWIZZLE_H01); in va_lower_constants()
205 if (info.swizzle && swz != BI_SWIZZLE_H01) in va_lower_constants()
208 assert(swz >= BI_SWIZZLE_H00 && swz <= BI_SWIZZLE_H11); in va_lower_constants()
209 value = bi_apply_swizzle(value, swz); in va_lower_constants()
212 unsigned chan = (swz - BI_SWIZZLE_B0000); in va_lower_constants()
218 value = bi_apply_swizzle(value, swz); in va_lower_constants()
[all...]
/third_party/mesa3d/src/gallium/drivers/r600/sfn/
H A Dsfn_alu_readport_validation.h40 bool schedule_vec_src(PVirtualValue src[3], int nsrc, AluBankSwizzle swz);
42 bool schedule_vec_instruction(const AluInstr& alu, AluBankSwizzle swz);
43 bool schedule_trans_instruction(const AluInstr& alu, AluBankSwizzle swz);
50 static int cycle_vec(AluBankSwizzle swz, int src);
51 static int cycle_trans(AluBankSwizzle swz, int src);
H A Dsfn_alu_readport_validation.cpp92 bool AluReadportReservation::schedule_vec_src(PVirtualValue src[3], int nsrc, AluBankSwizzle swz) in schedule_vec_src() argument
105 visitor.cycle = cycle_vec(swz, i); in schedule_vec_src()
113 bool AluReadportReservation::schedule_vec_instruction(const AluInstr& alu, AluBankSwizzle swz) in schedule_vec_instruction() argument
118 visitor.cycle = cycle_vec(swz, i); in schedule_vec_instruction()
127 bool AluReadportReservation::schedule_trans_instruction(const AluInstr& alu, AluBankSwizzle swz) in schedule_trans_instruction() argument
133 visitor1.cycle = cycle_trans(swz, i); in schedule_trans_instruction()
145 visitor2.cycle = cycle_trans(swz, i); in schedule_trans_instruction()
215 int AluReadportReservation::cycle_vec(AluBankSwizzle swz, int src) in cycle_vec() argument
225 return mapping[swz][src]; in cycle_vec()
228 int AluReadportReservation::cycle_trans(AluBankSwizzle swz, in argument
[all...]
/third_party/mesa3d/src/amd/vulkan/
H A Dvk_format.h67 vk_format_compose_swizzles(const VkComponentMapping *mapping, const unsigned char swz[4], in vk_format_compose_swizzles() argument
70 dst[0] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_R, swz, mapping->r); in vk_format_compose_swizzles()
71 dst[1] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_G, swz, mapping->g); in vk_format_compose_swizzles()
72 dst[2] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_B, swz, mapping->b); in vk_format_compose_swizzles()
73 dst[3] = radv_swizzle_conv(VK_COMPONENT_SWIZZLE_A, swz, mapping->a); in vk_format_compose_swizzles()
/third_party/mesa3d/src/mesa/program/
H A Dprog_parameter.c99 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()
403 GLuint swz in _mesa_add_typed_unnamed_constant() local
[all...]
/third_party/mesa3d/src/intel/common/
H A Dintel_pixel_hash.h101 unsigned swz[ARRAY_SIZE(phys_ids)]; in intel_compute_pixel_hash_table_nway() local
116 swz[k] = s; in intel_compute_pixel_hash_table_nway()
122 * Note that the swz permutation only affects the ordering of rows. in intel_compute_pixel_hash_table_nway()
127 * 2^ceil(log2(num_ids/W)) thanks to the above definition of the swz in intel_compute_pixel_hash_table_nway()
132 assert(swz[k] < num_ids); in intel_compute_pixel_hash_table_nway()
134 p[j + m * i] = phys_ids[(j + swz[k]) % num_ids]; in intel_compute_pixel_hash_table_nway()
/third_party/vk-gl-cts/external/vulkancts/modules/vulkan/pipeline/
H A DvktPipelineImageSamplingInstance.cpp1035 tcu::Vector<ScalarType, 4> swizzle (const tcu::Vector<ScalarType, 4>& vec, const vk::VkComponentMapping& swz) in swizzle() argument
1037 return tcu::Vector<ScalarType, 4>(getSwizzledComp(vec, swz.r, 0), in swizzle()
1038 getSwizzledComp(vec, swz.g, 1), in swizzle()
1039 getSwizzledComp(vec, swz.b, 2), in swizzle()
1040 getSwizzledComp(vec, swz.a, 3)); in swizzle()
1047 * \param swz swizzle component mapping, may include ZERO, ONE, or IDENTITY
1051 tcu::Vec4 swizzleScaleBias (const tcu::Vec4& vec, const vk::VkComponentMapping& swz, float zeroOrOneValue) in swizzleScaleBias() argument
1057 swz.r == VK_COMPONENT_SWIZZLE_IDENTITY ? VK_COMPONENT_SWIZZLE_R : swz.r, in swizzleScaleBias()
1058 swz in swizzleScaleBias()
1078 swizzleT(const tcu::ConstPixelBufferAccess& src, const tcu::PixelBufferAccess& dst, const vk::VkComponentMapping& swz) swizzleT() argument
1086 swizzleFromSRGB(const tcu::ConstPixelBufferAccess& src, const tcu::PixelBufferAccess& dst, const vk::VkComponentMapping& swz) swizzleFromSRGB() argument
1094 swizzle(const tcu::ConstPixelBufferAccess& src, const tcu::PixelBufferAccess& dst, const vk::VkComponentMapping& swz) swizzle() argument
1112 isIdentitySwizzle(const vk::VkComponentMapping& swz) isIdentitySwizzle() argument
1186 createSwizzledCopy(const TextureViewType& texture, const vk::VkComponentMapping& swz) createSwizzledCopy() argument
1200 createSwizzledCopy(const tcu::TextureCubeView& texture, const vk::VkComponentMapping& swz) createSwizzledCopy() argument
1217 validateResultImage(const TextureViewType& texture, const tcu::Sampler& sampler, const vk::VkComponentMapping& swz, const tcu::ConstPixelBufferAccess& texCoords, const tcu::Vec2& lodBounds, const tcu::LookupPrecision& lookupPrecision, const tcu::Vec4& lookupScale, const tcu::Vec4& lookupBias, const tcu::ConstPixelBufferAccess& result, const tcu::PixelBufferAccess& errorMask) validateResultImage() argument
[all...]
/third_party/vk-gl-cts/external/vulkancts/modules_no_buildgn/vulkan/pipeline/
H A DvktPipelineImageSamplingInstance.cpp1029 tcu::Vector<ScalarType, 4> swizzle (const tcu::Vector<ScalarType, 4>& vec, const vk::VkComponentMapping& swz) in swizzle() argument
1031 return tcu::Vector<ScalarType, 4>(getSwizzledComp(vec, swz.r, 0), in swizzle()
1032 getSwizzledComp(vec, swz.g, 1), in swizzle()
1033 getSwizzledComp(vec, swz.b, 2), in swizzle()
1034 getSwizzledComp(vec, swz.a, 3)); in swizzle()
1041 * \param swz swizzle component mapping, may include ZERO, ONE, or IDENTITY
1045 tcu::Vec4 swizzleScaleBias (const tcu::Vec4& vec, const vk::VkComponentMapping& swz, float zeroOrOneValue) in swizzleScaleBias() argument
1051 swz.r == VK_COMPONENT_SWIZZLE_IDENTITY ? VK_COMPONENT_SWIZZLE_R : swz.r, in swizzleScaleBias()
1052 swz in swizzleScaleBias()
1072 swizzleT(const tcu::ConstPixelBufferAccess& src, const tcu::PixelBufferAccess& dst, const vk::VkComponentMapping& swz) swizzleT() argument
1080 swizzleFromSRGB(const tcu::ConstPixelBufferAccess& src, const tcu::PixelBufferAccess& dst, const vk::VkComponentMapping& swz) swizzleFromSRGB() argument
1088 swizzle(const tcu::ConstPixelBufferAccess& src, const tcu::PixelBufferAccess& dst, const vk::VkComponentMapping& swz) swizzle() argument
1106 isIdentitySwizzle(const vk::VkComponentMapping& swz) isIdentitySwizzle() argument
1180 createSwizzledCopy(const TextureViewType& texture, const vk::VkComponentMapping& swz) createSwizzledCopy() argument
1194 createSwizzledCopy(const tcu::TextureCubeView& texture, const vk::VkComponentMapping& swz) createSwizzledCopy() argument
1211 validateResultImage(const TextureViewType& texture, const tcu::Sampler& sampler, const vk::VkComponentMapping& swz, const tcu::ConstPixelBufferAccess& texCoords, const tcu::Vec2& lodBounds, const tcu::LookupPrecision& lookupPrecision, const tcu::Vec4& lookupScale, const tcu::Vec4& lookupBias, const tcu::ConstPixelBufferAccess& result, const tcu::PixelBufferAccess& errorMask) validateResultImage() argument
[all...]
/third_party/mesa3d/src/gallium/drivers/crocus/
H A Dcrocus_resource.h47 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/intel/compiler/
H A Dbrw_reg.h76 #define BRW_GET_SWZ(swz, idx) (((swz) >> ((idx)*2)) & 0x3)
125 * Return the result of applying swizzle \p swz to shuffle the bits of \p mask
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()
142 * Return the result of applying the inverse of swizzle \p swz to shuffle the
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[ in brw_swizzle_for_mask()
201 brw_mask_for_swizzle(unsigned swz) brw_mask_for_swizzle() argument
[all...]
/third_party/mesa3d/src/panfrost/bifrost/
H A Dbi_lower_swizzle.c141 bi_swizzle_replicates_8(enum bi_swizzle swz) in bi_swizzle_replicates_8() argument
143 switch (swz) { in bi_swizzle_replicates_8()
155 bi_swizzle_replicates_16(enum bi_swizzle swz) in bi_swizzle_replicates_16() argument
157 switch (swz) { in bi_swizzle_replicates_16()
165 return bi_swizzle_replicates_8(swz); in bi_swizzle_replicates_16()

Completed in 17 milliseconds

12345