Accelerating TFP for R200 - texture format Voodoo?
Chris Rankin
rankincj at yahoo.com
Mon Jun 18 12:57:24 PDT 2007
Hi,
Could someone help me translate these texture format constants into something R200-compatible,
please?
R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8)
R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8)
R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5)
I am also wondering how best to port the following reference to the "image_override" field, from
the r300SetTexImages() function:
/* Only need to round to nearest 32 for textures, but the blitter
* requires 64-byte aligned pitches, and we may/may not need the
* blitter. NPOT only!
*/
if (baseImage->IsCompressed) {
t->pitch =
(tObj->Image[0][t->base.firstLevel]->Width + 63) & ~(63);
} else if (tObj->Target == GL_TEXTURE_RECTANGLE_NV) {
unsigned int align = blitWidth - 1;
t->pitch = ((tObj->Image[0][t->base.firstLevel]->Width *
texelBytes) + 63) & ~(63);
t->size |= R300_TX_SIZE_TXPITCH_EN;
if (!t->image_override)
t->pitch_reg =
(((tObj->Image[0][t->base.firstLevel]->Width) +
align) & ~align) - 1;
} else {
t->pitch =
((tObj->Image[0][t->base.firstLevel]->Width *
texelBytes) + 63) & ~(63);
}
I can see the "heritage" from the R200SetTexImages() function:
if (baseImage->IsCompressed)
t->pp_txpitch = (tObj->Image[0][t->base.firstLevel]->Width + 63) & ~(63);
else
t->pp_txpitch = ((tObj->Image[0][t->base.firstLevel]->Width * texelBytes) + 63) & ~(63);
t->pp_txpitch -= 32;
except that it's too different for me to just take an educated guess.
Thanks,
Chris
___________________________________________________________
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html
More information about the xorg-driver-ati
mailing list