Lines Matching defs:tmu

272         texture_unit_t& tmu = mTextureMachine.tmu[i];
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 if (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);
485 if (tmu.linear) {
487 if (tmu.format.size == 1) {
493 } else if (tmu.format.size == 2) {
499 } else if (tmu.format.size == 4) {
509 wrapping(u, s.reg, width, tmu.swrap, FRAC_BITS);
510 wrapping(v, t.reg, height, tmu.twrap, FRAC_BITS);
512 if (tmu.linear) {
515 const int shift = 31 - gglClz(tmu.format.size);
536 if (tmu.swrap == GGL_NEEDS_WRAP_REPEAT) {
571 if (tmu.twrap == GGL_NEEDS_WRAP_REPEAT) {
624 texel.setTo(regs.obtain(), &tmu.format);
625 txPtr.setTo(texel.reg, tmu.bits);
637 if (!tmu.linear) {
647 switch (tmu.format.size) {
648 case 1: filter8(parts, texel, tmu, U, V, txPtr, FRAC_BITS); break;
649 case 2: filter16(parts, texel, tmu, U, V, txPtr, FRAC_BITS); break;
650 case 3: filter24(parts, texel, tmu, U, V, txPtr, FRAC_BITS); break;
651 case 4: filter32(parts, texel, tmu, U, V, txPtr, FRAC_BITS); break;
663 const texture_unit_t& tmu = mTextureMachine.tmu[i];
664 if (tmu.format_idx == 0)
667 if ((tmu.swrap == GGL_NEEDS_WRAP_11) &&
668 (tmu.twrap == GGL_NEEDS_WRAP_11))
698 pixel_t& texel, const texture_unit_t& tmu,
702 if (tmu.format.components != GGL_ALPHA &&
703 tmu.format.components != GGL_LUMINANCE)
765 pixel_t& texel, const texture_unit_t& tmu,
775 switch (tmu.format_idx) {
798 ALOGE("Unsupported 16-bits texture format (%d)", tmu.format_idx);
812 const uint32_t offset = (mask & tmu.format.mask(i)) ? 0 : shift;
813 texel.format.c[i].h = tmu.format.c[i].h + offset + prec;
814 texel.format.c[i].l = texel.format.c[i].h - (tmu.format.bits(i) + prec);
883 pixel_t& texel, const texture_unit_t& tmu,
895 pixel_t& texel, const texture_unit_t& tmu,
993 pixel_t& texel, const texture_unit_t& tmu,
1089 texture_unit_t& tmu = mTextureMachine.tmu[i];
1091 if (tmu.mask & component_mask) {
1093 if ((tmu.replaced & component_mask) == 0) {
1094 // not replaced by a later tmu...
1100 tmu.swrap == GGL_NEEDS_WRAP_11 &&
1101 tmu.twrap == GGL_NEEDS_WRAP_11)
1112 switch (tmu.env) {
1295 const pixel_t& incomingTexel, int component, int tmu)
1310 immed12_pre(GGL_OFFSETOF(state.texture[tmu].env_color[component])));