summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Scheidegger <rscheidegger@gmx.ch>2006-09-20 18:22:19 +0000
committerRoland Scheidegger <rscheidegger@gmx.ch>2006-09-20 18:22:19 +0000
commit528de982f88bfc025425ce1188781a34f4d84f1f (patch)
tree40d7d389994088b3bc94fbaddf8e552d06a78e70
parent2e5c686c2b6f356895f33b2815e41386946ab55a (diff)
reenable code in _mesa_texstore_rgba8888 to avoid the generic copy path if only swizzling is required as it works just fine (tested with glean pixelFormats test and a hacked up r200 driver which always uses that format).
-rw-r--r--src/mesa/main/texstore.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index bd049a843f..f020d8ec7d 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1150,23 +1150,16 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
srcWidth, srcHeight, srcDepth, srcFormat, srcType,
srcAddr, srcPacking);
}
-#if 0
- /* broken? */
else if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
srcType == GL_UNSIGNED_BYTE &&
dstFormat == &_mesa_texformat_rgba8888 &&
littleEndian &&
- /* Three texture formats involved: srcFormat,
- * baseInternalFormat and destFormat (GL_RGBA). Only two
- * may differ. _mesa_swizzle_ubyte_image can't handle two
- * propagations at once correctly. */
- (srcFormat == baseInternalFormat ||
- baseInternalFormat == GL_RGBA) &&
+ can_swizzle(baseInternalFormat) &&
can_swizzle(srcFormat)) {
GLubyte dstmap[4];
- /* dstmap - how to swizzle from GL_RGBA to dst format:
+ /* dstmap - how to swizzle from RGBA to dst format:
*
* FIXME - add !litteEndian and _rev varients:
*/
@@ -1177,13 +1170,13 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS)
_mesa_swizzle_ubyte_image(ctx, dims,
srcFormat,
+ baseInternalFormat,
dstmap, 4,
dstAddr, dstXoffset, dstYoffset, dstZoffset,
- dstRowStride, dstImageStride,
+ dstRowStride, dstImageOffsets,
srcWidth, srcHeight, srcDepth, srcAddr,
srcPacking);
}
-#endif
else {
/* general path */
const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,