summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-02-16 08:38:56 -0700
committerBrian Paul <[email protected]>2015-02-16 08:39:25 -0700
commit9ac370014698fda062b41e86a6c20306d6573292 (patch)
tree41dffd8db7832ae2c30af28603e100e178f90683
parent4d2cee4d5e53a96b6badeb60a24a2c05a21eef5a (diff)
mesa: move assertion after declarations in texstore.c
To fix MSVC build.
-rw-r--r--src/mesa/main/texstore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index f25c0d7e0e1..7039cdf8174 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;