From: Gareth H. <ga...@va...> - 2001-01-29 16:47:17
|
I'm in the process of moving the Radeon DRI driver over to Mesa's single-copy texture mechanism. I'm using this opportunity to wrap up my changes to texutil.c and friends, which includes full MMX assembly optimizations for most of the interesting cases. I've noticed that this is special-cased: case MESA_R5_G6_B5: if (srcFormat == GL_RGB && srcType == GL_UNSIGNED_SHORT_5_6_5) { ... } However, later we see this: case MESA_A4_R4_G4_B4: /* store as 16-bit texels (GR_TEXFMT_ARGB_4444) */ if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV){ ... } And this: case MESA_A1_R5_G5_B5: /* store as 16-bit texels (GR_TEXFMT_ARGB_1555) */ if (srcFormat == GL_BGRA && srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV){ ... } In all cases, the data is memcpy'd to the final destination image. I'm going to change the first case to this: case MESA_R5_G6_B5: if (srcFormat == GL_BGR && srcType == GL_UNSIGNED_SHORT_5_6_5_REV) { ... } to fit with the rest of the cases and to make it actually useful to Mesa drivers that use little-endian texture images. If you don't want this to happen, scream now... -- Gareth |