From 9e59ed59c17daeb4e77f9455ac8794307cc1cae2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 22 Apr 2011 19:29:55 +0200 Subject: [PATCH] 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. --- src/mesa/main/texstore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 9a690529a83..cf12241342c 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, -- 2.30.2