mesa: move assertion after declarations in texstore.c

To fix MSVC build.
This commit is contained in:
Brian Paul 2015-02-16 08:38:56 -07:00
parent 4d2cee4d5e
commit 9ac3700146
1 changed files with 1 additions and 1 deletions

View File

@ -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;