i965: fix whitespace in brw_tex_layout.c
authorEric Anholt <eric@anholt.net>
Thu, 21 May 2009 04:15:46 +0000 (21:15 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 21 May 2009 17:41:49 +0000 (10:41 -0700)
The broken indentation was driving me crazy, so fix other stuff while
I'm here.

src/mesa/drivers/dri/i965/brw_tex_layout.c

index 51a617fcb400efb722eaa1b1ed6645dfc36fbe85..be8ce546a9ed1d60d949a50887140e7b414133d5 100644 (file)
@@ -28,7 +28,6 @@
   * Authors:
   *   Keith Whitwell <keith@tungstengraphics.com>
   */
-        
 
 /* Code to layout images in a mipmap tree for i965.
  */
 
 #define FILE_DEBUG_FLAG DEBUG_MIPTREE
 
-GLboolean brw_miptree_layout( struct intel_context *intel, struct intel_mipmap_tree *mt )
+GLboolean brw_miptree_layout(struct intel_context *intel,
+                            struct intel_mipmap_tree *mt)
 {
-   /* XXX: these vary depending on image format: 
-    */
-/*    GLint align_w = 4; */
+   /* XXX: these vary depending on image format: */
+   /* GLint align_w = 4; */
 
    switch (mt->target) {
-   case GL_TEXTURE_CUBE_MAP: 
+   case GL_TEXTURE_CUBE_MAP:
    case GL_TEXTURE_3D: {
       GLuint width  = mt->width0;
       GLuint height = mt->height0;
@@ -59,7 +58,7 @@ GLboolean brw_miptree_layout( struct intel_context *intel, struct intel_mipmap_t
       GLuint align_w = 4;
 
       mt->total_height = 0;
-      
+
       if (mt->compressed) {
           align_w = intel_compressed_alignment(mt->internal_format);
           mt->pitch = ALIGN(width, align_w);
@@ -72,12 +71,12 @@ GLboolean brw_miptree_layout( struct intel_context *intel, struct intel_mipmap_t
       pack_x_pitch = mt->pitch;
       pack_x_nr = 1;
 
-      for ( level = mt->first_level ; level <= mt->last_level ; level++ ) {
+      for (level = mt->first_level ; level <= mt->last_level ; level++) {
         GLuint nr_images = mt->target == GL_TEXTURE_3D ? depth : 6;
         GLint x = 0;
         GLint y = 0;
         GLint q, j;
-           
+
         intel_miptree_set_level_info(mt, level, nr_images,
                                      0, mt->total_height,
                                      width, height, depth);
@@ -89,7 +88,7 @@ GLboolean brw_miptree_layout( struct intel_context *intel, struct intel_mipmap_t
            }
 
            x = 0;
-           y += pack_y_pitch;      
+           y += pack_y_pitch;
         }
 
 
@@ -98,25 +97,25 @@ GLboolean brw_miptree_layout( struct intel_context *intel, struct intel_mipmap_t
         height = minify(height);
         depth  = minify(depth);
 
-    if (mt->compressed) {
-        pack_y_pitch = (height + 3) / 4;
-        
-        if (pack_x_pitch > ALIGN(width, align_w)) {
-            pack_x_pitch = ALIGN(width, align_w);
-            pack_x_nr <<= 1;
-        }
-    } else {
-        if (pack_x_pitch > 4) {
-            pack_x_pitch >>= 1;
-            pack_x_nr <<= 1;
-            assert(pack_x_pitch * pack_x_nr <= mt->pitch);
-        }
-
-        if (pack_y_pitch > 2) {
-            pack_y_pitch >>= 1;
-            pack_y_pitch = ALIGN(pack_y_pitch, align_h);
-        }
-    }
+        if (mt->compressed) {
+           pack_y_pitch = (height + 3) / 4;
+
+           if (pack_x_pitch > ALIGN(width, align_w)) {
+              pack_x_pitch = ALIGN(width, align_w);
+              pack_x_nr <<= 1;
+           }
+        } else {
+           if (pack_x_pitch > 4) {
+              pack_x_pitch >>= 1;
+              pack_x_nr <<= 1;
+              assert(pack_x_pitch * pack_x_nr <= mt->pitch);
+           }
+
+           if (pack_y_pitch > 2) {
+              pack_y_pitch >>= 1;
+              pack_y_pitch = ALIGN(pack_y_pitch, align_h);
+           }
+        }
 
       }
       break;
@@ -126,12 +125,12 @@ GLboolean brw_miptree_layout( struct intel_context *intel, struct intel_mipmap_t
       i945_miptree_layout_2d(intel, mt);
       break;
    }
-   DBG("%s: %dx%dx%d - sz 0x%x\n", __FUNCTION__, 
-               mt->pitch, 
+   DBG("%s: %dx%dx%d - sz 0x%x\n", __FUNCTION__,
+               mt->pitch,
                mt->total_height,
                mt->cpp,
                mt->pitch * mt->total_height * mt->cpp );
-               
+
    return GL_TRUE;
 }