diff options
author | Brian Paul <[email protected]> | 2014-05-01 13:05:19 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-05-01 16:01:06 -0600 |
commit | 5ec1adeb1020c719c5bd72263f1d2719c276f1a7 (patch) | |
tree | cf67fd6f74de34bd1b82d543921de96f21f1eeae | |
parent | eb502c31a0ed994258fca0c9d2fef6810dc64233 (diff) |
mesa: move declarations before code in texstore.c
To fix MSVC build.
Reviewed-by: Anuj Phogat <[email protected]>
-rw-r--r-- | src/mesa/main/texstore.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 436e5a8398d..764214669e1 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -2473,6 +2473,8 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS) const GLint srcRowStride = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); GLint img, row; + GLuint *depth = malloc(srcWidth * sizeof(GLuint)); + GLubyte *stencil = malloc(srcWidth * sizeof(GLubyte)); ASSERT(dstFormat == MESA_FORMAT_S8_UINT_Z24_UNORM); ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || @@ -2482,9 +2484,6 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS) srcType == GL_UNSIGNED_INT_24_8_EXT || srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV); - GLuint *depth = malloc(srcWidth * sizeof(GLuint)); - GLubyte *stencil = malloc(srcWidth * sizeof(GLubyte)); - if (!depth || !stencil) { free(depth); free(stencil); @@ -3416,6 +3415,11 @@ _mesa_texstore_r11_g11_b10f(TEXSTORE_PARAMS) static GLboolean _mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS) { + GLint img, row; + const GLint srcRowStride + = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType) + / sizeof(uint64_t); + ASSERT(dstFormat == MESA_FORMAT_Z32_FLOAT_S8X24_UINT); ASSERT(srcFormat == GL_DEPTH_STENCIL || srcFormat == GL_DEPTH_COMPONENT || @@ -3424,11 +3428,6 @@ _mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS) srcType == GL_UNSIGNED_INT_24_8 || srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV); - GLint img, row; - const GLint srcRowStride - = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType) - / sizeof(uint64_t); - /* In case we only upload depth we need to preserve the stencil */ for (img = 0; img < srcDepth; img++) { uint64_t *dstRow = (uint64_t *) dstSlices[img]; |