summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-04-22 19:29:55 +0200
committerMarek Olšák <maraeo@gmail.com>2011-04-25 13:45:05 +0200
commit9e59ed59c17daeb4e77f9455ac8794307cc1cae2 (patch)
tree1fb78173548cfd23885862c183a7164151db2557
parent628544421d243e0ca8679c5d245728260d9e010d (diff)
mesa: add stricter checks for float formats in the texstore memcpy path
E.g. when the internal format was RGBA16F and the source was RG, it would use memcpy.
-rw-r--r--src/mesa/main/texstore.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 9a690529a8..cf12241342 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -3551,6 +3551,7 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
baseInternalFormat == srcFormat &&
+ baseInternalFormat == baseFormat &&
srcType == GL_FLOAT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
@@ -3625,6 +3626,7 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
baseInternalFormat == srcFormat &&
+ baseInternalFormat == baseFormat &&
srcType == GL_HALF_FLOAT_ARB) {
/* simple memcpy path */
memcpy_texture(ctx, dims,