Home | History | Annotate | Download | only in codeflinger

Lines Matching defs:tmu

272         texture_unit_t& tmu = mTextureMachine.tmu[i];
274 // all components are replaced, skip this TMU.
275 tmu.format_idx = 0;
276 tmu.mask = 0;
277 tmu.replaced = replaced;
280 tmu.format_idx = GGL_READ_NEEDS(T_FORMAT, needs.t[i]);
281 tmu.format = c->formats[tmu.format_idx];
282 tmu.bits = tmu.format.size*8;
283 tmu.swrap = GGL_READ_NEEDS(T_S_WRAP, needs.t[i]);
284 tmu.twrap = GGL_READ_NEEDS(T_T_WRAP, needs.t[i]);
285 tmu.env = ggl_needs_to_env(GGL_READ_NEEDS(T_ENV, needs.t[i]));
286 tmu.pot = GGL_READ_NEEDS(T_POT, needs.t[i]);
287 tmu.linear = GGL_READ_NEEDS(T_LINEAR, needs.t[i])
288 && tmu.format.size!=3; // XXX: only 8, 16 and 32 modes for now
291 if (tmu.format_idx == GGL_PIXEL_FORMAT_RGBA_5551)
292 tmu.linear = 0;
294 tmu.mask = 0;
295 tmu.replaced = replaced;
297 if (tmu.format_idx) {
299 if (tmu.format.c[0].h) tmu.mask |= 0x1;
300 if (tmu.format.c[1].h) tmu.mask |= 0x2;
301 if (tmu.format.c[2].h) tmu.mask |= 0x4;
302 if (tmu.format.c[3].h) tmu.mask |= 0x8;
303 if (tmu.env == GGL_REPLACE) {
304 replaced |= tmu.mask;
305 } else if (tmu.env == GGL_DECAL) {
306 if (!tmu.format.c[GGLFormat::ALPHA].h) {
308 tmu.mask = 0;
311 tmu.mask &= ~(1<<GGLFormat::ALPHA);
315 mTextureMachine.mask |= tmu.mask;
317 // i, int(tmu.mask), int(tmu.replaced));
339 // init texture coordinates for each tmu
343 const texture_unit_t& tmu = mTextureMachine.tmu[i];
344 if (tmu.format_idx == 0)
346 if ((tmu.swrap == GGL_NEEDS_WRAP_11) &&
347 (tmu.twrap == GGL_NEEDS_WRAP_11))
351 txPtr.setTo(obtainReg(), tmu.bits);
396 cb_format_idx == tmu.format_idx && !tmu.linear &&
397 mTextureMachine.replaced == tmu.mask)
416 const texture_unit_t& tmu = mTextureMachine.tmu[i];
417 if (tmu.format_idx == 0)
419 if (tmu.linear) {
422 if (tmu.format.size == 1) {
427 tmu.format.size == 4) {
441 const texture_unit_t& tmu = mTextureMachine.tmu[i];
442 if (tmu.format_idx == 0)
449 if ((tmu.swrap == GGL_NEEDS_WRAP_11) &&
450 (tmu.twrap == GGL_NEEDS_WRAP_11))
453 texel.setTo(regs.obtain(), &tmu.format);
479 if (tmu.linear) {
481 if (tmu.format.size == 1) {
487 } else if (tmu.format.size == 2) {
493 } else if (tmu.format.size == 4) {
503 wrapping(u, s.reg, width, tmu.swrap, FRAC_BITS);
504 wrapping(v, t.reg, height, tmu.twrap, FRAC_BITS);
506 if (tmu.linear) {
509 const int shift = 31 - gglClz(tmu.format.size);
527 if (tmu.swrap == GGL_NEEDS_WRAP_REPEAT) {
562 if (tmu.twrap == GGL_NEEDS_WRAP_REPEAT) {
611 texel.setTo(regs.obtain(), &tmu.format);
612 txPtr.setTo(texel.reg, tmu.bits);
620 if (!tmu.linear) {
630 switch (tmu.format.size) {
631 case 1: filter8(parts, texel, tmu, U, V, txPtr, FRAC_BITS); break;
632 case 2: filter16(parts, texel, tmu, U, V, txPtr, FRAC_BITS); break;
633 case 3: filter24(parts, texel, tmu, U, V, txPtr, FRAC_BITS); break;
634 case 4: filter32(parts, texel, tmu, U, V, txPtr, FRAC_BITS); break;
646 const texture_unit_t& tmu = mTextureMachine.tmu[i];
647 if (tmu.format_idx == 0)
650 if ((tmu.swrap == GGL_NEEDS_WRAP_11) &&
651 (tmu.twrap == GGL_NEEDS_WRAP_11))
681 pixel_t& texel, const texture_unit_t& tmu,
685 if (tmu.format.components != GGL_ALPHA &&
686 tmu.format.components != GGL_LUMINANCE)
748 pixel_t& texel, const texture_unit_t& tmu,
758 switch (tmu.format_idx) {
781 LOGE("Unsupported 16-bits texture format (%d)", tmu.format_idx);
795 const uint32_t offset = (mask & tmu.format.mask(i)) ? 0 : shift;
796 texel.format.c[i].h = tmu.format.c[i].h + offset + prec;
797 texel.format.c[i].l = texel.format.c[i].h - (tmu.format.bits(i) + prec);
866 pixel_t& texel, const texture_unit_t& tmu,
878 pixel_t& texel, const texture_unit_t& tmu,
976 pixel_t& texel, const texture_unit_t& tmu,
1072 texture_unit_t& tmu = mTextureMachine.tmu[i];
1074 if (tmu.mask & component_mask) {
1076 if ((tmu.replaced & component_mask) == 0) {
1077 // not replaced by a later tmu...
1082 tmu.swrap == GGL_NEEDS_WRAP_11 &&
1083 tmu.twrap == GGL_NEEDS_WRAP_11)
1094 switch (tmu.env) {
1164 // from the TMU.
1277 const pixel_t& incomingTexel, int component, int tmu)
1292 immed12_pre(GGL_OFFSETOF(state.texture[tmu].env_color[component])));