mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-22 01:10:32 +01:00
detect some more cases which can use straight memcpy for _mesa_texstore_rgba8888
This commit is contained in:
parent
99e0236046
commit
2e2a981335
1 changed files with 19 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue