Home
last modified time | relevance | path

Searched refs:swz (Results 1 – 25 of 51) sorted by relevance

123

/external/mesa3d/src/gallium/drivers/r300/compiler/
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 = GET_SWZ(swizzle, chan); in swizzle_mask() local
[all …]
Dr300_fragprog_swizzle.c77 unsigned int swz = GET_SWZ(swizzle, comp); in lookup_native_swizzle() local
78 if (swz == RC_SWIZZLE_UNUSED) in lookup_native_swizzle()
80 if (swz != GET_SWZ(sd->hash, comp)) in lookup_native_swizzle()
121 unsigned int swz = GET_SWZ(reg.Swizzle, j); in r300_swizzle_is_native() local
122 if (swz == RC_SWIZZLE_UNUSED) in r300_swizzle_is_native()
124 if (swz != j) in r300_swizzle_is_native()
164 unsigned int swz; in r300_swizzle_split() local
167 swz = GET_SWZ(src.Swizzle, comp); in r300_swizzle_split()
168 if (swz == RC_SWIZZLE_UNUSED) in r300_swizzle_split()
170 if (swz == GET_SWZ(sd->hash, comp)) { in r300_swizzle_split()
[all …]
Dradeon_optimize.c187 unsigned int swz = GET_SWZ(src.Swizzle, chan); in is_src_uniform_constant() local
188 if (swz < 4) { in is_src_uniform_constant()
192 if (swz == RC_SWIZZLE_UNUSED) in is_src_uniform_constant()
196 *pswz = swz; in is_src_uniform_constant()
200 if (swz != *pswz || *pnegate != GET_BIT(src.Negate, chan)) { in is_src_uniform_constant()
212 rc_swizzle swz = 0; in constant_folding_mad() local
215 if (is_src_uniform_constant(inst->U.I.SrcReg[2], &swz, &negate)) { in constant_folding_mad()
216 if (swz == RC_SWIZZLE_ZERO) { in constant_folding_mad()
222 if (is_src_uniform_constant(inst->U.I.SrcReg[1], &swz, &negate)) { in constant_folding_mad()
223 if (swz == RC_SWIZZLE_ONE) { in constant_folding_mad()
[all …]
Dradeon_program_pair.c135 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()
Dradeon_pair_translate.c137 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 …]
Dradeon_inline_literals.c85 unsigned swz, chan; in rc_inline_literals() local
88 swz = RC_SWIZZLE_UNUSED; in rc_inline_literals()
100 swz = GET_SWZ(src_reg->Swizzle, chan); in rc_inline_literals()
101 if (swz == RC_SWIZZLE_UNUSED) { in rc_inline_literals()
104 float_value = constant->u.Immediate[swz]; in rc_inline_literals()
Dradeon_program_constants.h120 #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)); \
Dradeon_compiler_util.h14 unsigned int rc_swizzle_to_writemask(unsigned int swz);
16 rc_swizzle get_swz(unsigned int swz, rc_swizzle idx);
24 unsigned int combine_swizzles(unsigned int src, unsigned int swz);
Dr500_fragprog.c201 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()
Dradeon_dataflow.c66 unsigned int swz, unsigned int src) in pair_get_src_refmasks() argument
68 if (swz >= 4) in pair_get_src_refmasks()
71 if (swz == RC_SWIZZLE_X || swz == RC_SWIZZLE_Y || swz == RC_SWIZZLE_Z) { in pair_get_src_refmasks()
78 refmasks[i] |= 1 << swz; in pair_get_src_refmasks()
82 refmasks[src] |= 1 << swz; in pair_get_src_refmasks()
86 if (swz == RC_SWIZZLE_W) { in pair_get_src_refmasks()
92 refmasks[i] |= 1 << swz; in pair_get_src_refmasks()
96 refmasks[src] |= 1 << swz; in pair_get_src_refmasks()
Dradeon_program_print.c170 static char rc_swizzle_char(unsigned int swz) in rc_swizzle_char() argument
172 switch(swz) { in rc_swizzle_char()
182 fprintf(stderr, "bad swz: %u\n", swz); in rc_swizzle_char()
190 rc_swizzle swz = GET_SWZ(swizzle, comp); in rc_print_swizzle() local
193 fprintf(f, "%c", rc_swizzle_char(swz)); in rc_print_swizzle()
/external/mesa3d/src/gallium/drivers/nv30/
Dnv30_texture.c190 swizzle(const struct nv30_texfmt *fmt, unsigned cmp, unsigned swz) in swizzle() argument
192 uint32_t data = fmt->swz[swz].src << 8; in swizzle()
193 if (swz <= PIPE_SWIZZLE_ALPHA) in swizzle()
194 data |= fmt->swz[swz].cmp; in swizzle()
196 data |= fmt->swz[cmp].cmp; in swizzle()
240 so->swz = fmt->swizzle; in nv30_sampler_view_create()
241 so->swz |= swizzle(fmt, 3, tmpl->swizzle_a); in nv30_sampler_view_create()
242 so->swz |= swizzle(fmt, 0, tmpl->swizzle_r) << 2; in nv30_sampler_view_create()
243 so->swz |= swizzle(fmt, 1, tmpl->swizzle_g) << 4; in nv30_sampler_view_create()
244 so->swz |= swizzle(fmt, 2, tmpl->swizzle_b) << 6; in nv30_sampler_view_create()
[all …]
Dnvfx_shader.h413 #define swz(s,x,y,z,w) nvfx_src_swz((s), NVFX_SWZ_##x, NVFX_SWZ_##y, NVFX_SWZ_##z, NVFX_SWZ_##w) macro
430 uint8_t swz[4]; member
488 .swz = { 0, 1, 2, 3 }, in nvfx_src()
499 dst.swz[NVFX_SWZ_X] = src.swz[x]; in nvfx_src_swz()
500 dst.swz[NVFX_SWZ_Y] = src.swz[y]; in nvfx_src_swz()
501 dst.swz[NVFX_SWZ_Z] = src.swz[z]; in nvfx_src_swz()
502 dst.swz[NVFX_SWZ_W] = src.swz[w]; in nvfx_src_swz()
Dnvfx_fragprog.c151 sr |= ((src.swz[0] << NVFX_FP_REG_SWZ_X_SHIFT) | in emit_src()
152 (src.swz[1] << NVFX_FP_REG_SWZ_Y_SHIFT) | in emit_src()
153 (src.swz[2] << NVFX_FP_REG_SWZ_Z_SHIFT) | in emit_src()
154 (src.swz[3] << NVFX_FP_REG_SWZ_W_SHIFT)); in emit_src()
402 src.swz[0] = fsrc->Register.SwizzleX; in tgsi_src()
403 src.swz[1] = fsrc->Register.SwizzleY; in tgsi_src()
404 src.swz[2] = fsrc->Register.SwizzleZ; in tgsi_src()
405 src.swz[3] = fsrc->Register.SwizzleW; in tgsi_src()
478 addend.swz[0] = fsrc->Register.SwizzleX; in nvfx_fragprog_parse_instruction()
479 addend.swz[1] = fsrc->Register.SwizzleY; in nvfx_fragprog_parse_instruction()
[all …]
Dnvfx_vertprog.c161 sr |= ((src.swz[0] << NVFX_VP(SRC_SWZ_X_SHIFT)) | in emit_src()
162 (src.swz[1] << NVFX_VP(SRC_SWZ_Y_SHIFT)) | in emit_src()
163 (src.swz[2] << NVFX_VP(SRC_SWZ_Z_SHIFT)) | in emit_src()
164 (src.swz[3] << NVFX_VP(SRC_SWZ_W_SHIFT))); in emit_src()
394 src.swz[0] = fsrc->Register.SwizzleX; in tgsi_src()
395 src.swz[1] = fsrc->Register.SwizzleY; in tgsi_src()
396 src.swz[2] = fsrc->Register.SwizzleZ; in tgsi_src()
397 src.swz[3] = fsrc->Register.SwizzleW; in tgsi_src()
584 …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()
643 …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 …]
Dnv30_format.c206 .swz[0] = { SWZ_OUT_##d, SWZ_SRC_##h }, \
207 .swz[1] = { SWZ_OUT_##e, SWZ_SRC_##i }, \
208 .swz[2] = { SWZ_OUT_##f, SWZ_SRC_##j }, \
209 .swz[3] = { SWZ_OUT_##g, SWZ_SRC_##k }, \
210 .swz[4] = { SWZ_OUT_0, SWZ_SRC_x }, \
211 .swz[5] = { SWZ_OUT_1, SWZ_SRC_x }, \
/external/mesa3d/src/mesa/program/
Dprog_parameter.c268 GLuint swz = p->Size; /* 1, 2 or 3 for Y, Z, W */ in _mesa_add_typed_unnamed_constant() local
271 *swizzleOut = MAKE_SWIZZLE4(swz, swz, swz, swz); in _mesa_add_typed_unnamed_constant()
535 GLuint swz[4]; in _mesa_lookup_parameter_constant() local
539 swz[j] = j; in _mesa_lookup_parameter_constant()
545 swz[j] = k; in _mesa_lookup_parameter_constant()
554 swz[j] = swz[j-1]; in _mesa_lookup_parameter_constant()
558 *swizzleOut = MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); in _mesa_lookup_parameter_constant()
Dnvfragparse.c691 GLuint swz[4]; in Parse_CondCodeMask() local
696 if (!Parse_SwizzleSuffix(token, swz)) in Parse_CondCodeMask()
699 dstReg->CondSwizzle = MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); in Parse_CondCodeMask()
1070 GLuint swz[4]; in Parse_VectorSrc() local
1075 if (!Parse_SwizzleSuffix(token, swz)) in Parse_VectorSrc()
1078 srcReg->Swizzle = MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]); in Parse_VectorSrc()
Dprog_optimize.c159 is_swizzle_regular(GLuint swz) in is_swizzle_regular() argument
161 return GET_SWZ(swz,0) <= SWIZZLE_W && in is_swizzle_regular()
162 GET_SWZ(swz,1) <= SWIZZLE_W && in is_swizzle_regular()
163 GET_SWZ(swz,2) <= SWIZZLE_W && in is_swizzle_regular()
164 GET_SWZ(swz,3) <= SWIZZLE_W; in is_swizzle_regular()
287 const GLuint swz = GET_SWZ(inst->SrcReg[j].Swizzle, comp); in _mesa_remove_dead_code_global() local
288 ASSERT(swz < 4); in _mesa_remove_dead_code_global()
289 if ((read_mask & (1 << swz)) == 0) in _mesa_remove_dead_code_global()
291 if (swz <= SWIZZLE_W) in _mesa_remove_dead_code_global()
292 tempRead[index][swz] = GL_TRUE; in _mesa_remove_dead_code_global()
/external/mesa3d/src/gallium/drivers/nv50/
Dnv50_tex.c35 nv50_tic_swizzle(uint32_t tc, unsigned swz, boolean tex_int) in nv50_tic_swizzle() argument
37 switch (swz) { in nv50_tic_swizzle()
80 uint32_t swz[4]; in nv50_create_sampler_view() local
109 swz[0] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_r, tex_int); in nv50_create_sampler_view()
110 swz[1] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_g, tex_int); in nv50_create_sampler_view()
111 swz[2] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_b, tex_int); in nv50_create_sampler_view()
112 swz[3] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_a, tex_int); in nv50_create_sampler_view()
114 (swz[0] << NV50_TIC_0_MAPR__SHIFT) | in nv50_create_sampler_view()
115 (swz[1] << NV50_TIC_0_MAPG__SHIFT) | in nv50_create_sampler_view()
116 (swz[2] << NV50_TIC_0_MAPB__SHIFT) | in nv50_create_sampler_view()
[all …]
/external/mesa3d/src/gallium/drivers/nvc0/
Dnvc0_tex.c37 nv50_tic_swizzle(uint32_t tc, unsigned swz, boolean tex_int) in nv50_tic_swizzle() argument
39 switch (swz) { in nv50_tic_swizzle()
64 uint32_t swz[4]; in nvc0_create_sampler_view() local
92 swz[0] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_r, tex_int); in nvc0_create_sampler_view()
93 swz[1] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_g, tex_int); in nvc0_create_sampler_view()
94 swz[2] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_b, tex_int); in nvc0_create_sampler_view()
95 swz[3] = nv50_tic_swizzle(tic[0], view->pipe.swizzle_a, tex_int); in nvc0_create_sampler_view()
97 (swz[0] << NV50_TIC_0_MAPR__SHIFT) | in nvc0_create_sampler_view()
98 (swz[1] << NV50_TIC_0_MAPG__SHIFT) | in nvc0_create_sampler_view()
99 (swz[2] << NV50_TIC_0_MAPB__SHIFT) | in nvc0_create_sampler_view()
[all …]
/external/deqp/modules/gles3/functional/
Des3fTextureSwizzleTests.cpp48 static int swizzle (const tcu::RGBA& c, deUint32 swz) in swizzle() argument
50 switch (swz) in swizzle()
311 deUint32 swz = swizzles[swzNdx].swizzle; in init() local
312 deUint32 swzR = (chanNdx == 0) ? swz : defaultSwizzles[0]; in init()
313 deUint32 swzG = (chanNdx == 1) ? swz : defaultSwizzles[1]; in init()
314 deUint32 swzB = (chanNdx == 2) ? swz : defaultSwizzles[2]; in init()
315 deUint32 swzA = (chanNdx == 3) ? swz : defaultSwizzles[3]; in init()
/external/deqp/modules/gles31/functional/
Des31fTextureFilteringTests.cpp232 const tcu::IVec4 swz = levelSwz[layerFaceNdx % DE_LENGTH_OF_ARRAY(levelSwz)]; in init() local
233 …const tcu::Vec4 gMin = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f).swizzle(swz[0],swz[1],swz[2],swz[3])*cSc… in init()
234 …const tcu::Vec4 gMax = tcu::Vec4(1.0f, 1.0f, 1.0f, 0.0f).swizzle(swz[0],swz[1],swz[2],swz[3])*cSc… in init()
/external/mesa3d/src/gallium/drivers/nv50/codegen/
Dnv50_ir_from_sm4.cpp1213 int swz = op.swizzle[c]; in interpolate() local
1222 insn->setSrc(0, iSym(idx, swz)); in interpolate()
1242 const int swz = op.swizzle[c]; in src() local
1246 res = loadImm(NULL, (uint32_t)op.imm_values[swz].u32); in src()
1250 res = loadImm(NULL, op.imm_values[swz].u64); in src()
1256 res = tData64.load(idx, swz, NULL); in src()
1258 res = tData32.load(idx, swz, NULL); in src()
1275 ld = mkOp1(OP_VFETCH, TYPE_U32, res, iSym(idx, swz)); in src()
1280 res = mkLoad(sTy, iSym(idx, swz), getSrcPtr(s, 0, 4)); in src()
1291 off = (op.indices[1].disp * 4 + swz) * (sTy == TYPE_F64 ? 8 : 4); in src()
[all …]
/external/mesa3d/src/gallium/auxiliary/util/
Du_format.c698 const unsigned char swz[4]) in util_format_swizzle_4f()
703 if (swz[i] <= UTIL_FORMAT_SWIZZLE_W) in util_format_swizzle_4f()
704 dst[i] = src[swz[i]]; in util_format_swizzle_4f()
705 else if (swz[i] == UTIL_FORMAT_SWIZZLE_0) in util_format_swizzle_4f()
707 else if (swz[i] == UTIL_FORMAT_SWIZZLE_1) in util_format_swizzle_4f()
713 const unsigned char swz[4]) in util_format_unswizzle_4f()
718 switch (swz[i]) { in util_format_unswizzle_4f()

123