mesa: Move variable declarations to the scope top.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 24 Jun 2008 01:18:08 +0000 (10:18 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 24 Jun 2008 02:00:01 +0000 (11:00 +0900)
src/mesa/main/texstore.c

index 519a73b..113eef6 100644 (file)
@@ -2405,16 +2405,15 @@ GLboolean
 _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
 {
    const GLuint depthScale = 0xffffff;
-
-   ASSERT(dstFormat == &_mesa_texformat_s8_z24);
-   ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || srcFormat == GL_DEPTH_COMPONENT);
-   ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT);
-
    const GLint srcRowStride
       = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType)
       / sizeof(GLuint);
    GLint img, row;
 
+   ASSERT(dstFormat == &_mesa_texformat_s8_z24);
+   ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || srcFormat == GL_DEPTH_COMPONENT);
+   ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT);
+
    /* Incase we only upload depth we need to preserve the stencil */
    if (srcFormat == GL_DEPTH_COMPONENT) {
       for (img = 0; img < srcDepth; img++) {