diff options
author | Roland Scheidegger <[email protected]> | 2006-09-13 23:51:39 +0000 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2006-09-13 23:51:39 +0000 |
commit | 2e2a9813355993ba79eeb8070391e45aabb84f94 (patch) | |
tree | 7c09189a4de6fc2ed2db7e63ce276d29e372e935 /src/mesa | |
parent | 99e0236046436fba25afb60632a76ad9cdfbbc9a (diff) |
detect some more cases which can use straight memcpy for _mesa_texstore_rgba8888
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/texstore.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 4eb33c6b203..7471934b49d 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -1066,7 +1066,25 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS) dstFormat == &_mesa_texformat_rgba8888 && baseInternalFormat == GL_RGBA && ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8) || - (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8_REV))) { + (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && !littleEndian) || + (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) || + (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && littleEndian))) { + /* simple memcpy path */ + memcpy_texture(ctx, dims, + dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, + dstRowStride, + dstImageOffsets, + srcWidth, srcHeight, srcDepth, srcFormat, srcType, + srcAddr, srcPacking); + } + else if (!ctx->_ImageTransferState && + !srcPacking->SwapBytes && + dstFormat == &_mesa_texformat_rgba8888_rev && + baseInternalFormat == GL_RGBA && + ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) || + (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && littleEndian) || + (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8) || + (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && !littleEndian))) { /* simple memcpy path */ memcpy_texture(ctx, dims, dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, |