From: Brian Paul Date: Mon, 16 Feb 2015 15:38:56 +0000 (-0700) Subject: mesa: move assertion after declarations in texstore.c X-Git-Tag: upstream/17.1.0~20791 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ac370014698fda062b41e86a6c20306d6573292;p=platform%2Fupstream%2Fmesa.git mesa: move assertion after declarations in texstore.c To fix MSVC build. --- diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index f25c0d7..7039cdf 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -729,9 +729,9 @@ texstore_rgba(TEXSTORE_PARAMS) GLint swapSize = _mesa_sizeof_packed_type(srcType); if (swapSize == 2 || swapSize == 4) { int bytesPerPixel = _mesa_bytes_per_pixel(srcFormat, srcType); - assert(bytesPerPixel % swapSize == 0); int swapsPerPixel = bytesPerPixel / swapSize; int elementCount = srcWidth * srcHeight * srcDepth; + assert(bytesPerPixel % swapSize == 0); tempImage = malloc(elementCount * bytesPerPixel); if (!tempImage) return GL_FALSE;