i915: reference __DRI_ATTRIB_SWAP_COPY token over the GLX one
[mesa.git] / src / mesa / drivers / dri / i915 / i915_tex_layout.c
index 90911a647c7a6f530b758d038ca6e645fc1d019a..e76ccb0b5662255dd14dcd6c572adc6c8473230a 100644 (file)
@@ -1,6 +1,6 @@
 /**************************************************************************
  * 
- * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2006 VMware, Inc.
  * All Rights Reserved.
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -18,7 +18,7 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -172,9 +172,9 @@ i915_miptree_layout_3d(struct intel_mipmap_tree * mt)
 
       stack_height += MAX2(2, height);
 
-      width = minify(width);
-      height = minify(height);
-      depth = minify(depth);
+      width = minify(width, 1);
+      height = minify(height, 1);
+      depth = minify(depth, 1);
    }
 
    /* Fixup depth image_offsets: */
@@ -186,7 +186,7 @@ i915_miptree_layout_3d(struct intel_mipmap_tree * mt)
                                        0, i * stack_height);
       }
 
-      depth = minify(depth);
+      depth = minify(depth, 1);
    }
 
    /* Multiply slice size by texture depth for total size.  It's
@@ -219,8 +219,8 @@ i915_miptree_layout_2d(struct intel_mipmap_tree * mt)
 
       mt->total_height += img_height;
 
-      width = minify(width);
-      height = minify(height);
+      width = minify(width, 1);
+      height = minify(height, 1);
    }
 }
 
@@ -244,7 +244,7 @@ i915_miptree_layout(struct intel_mipmap_tree * mt)
       break;
    }
 
-   DBG("%s: %dx%dx%d\n", __FUNCTION__,
+   DBG("%s: %dx%dx%d\n", __func__,
        mt->total_width, mt->total_height, mt->cpp);
 }
 
@@ -447,9 +447,9 @@ i945_miptree_layout_3d(struct intel_mipmap_tree * mt)
         pack_y_pitch >>= 1;
       }
 
-      width = minify(width);
-      height = minify(height);
-      depth = minify(depth);
+      width = minify(width, 1);
+      height = minify(height, 1);
+      depth = minify(depth, 1);
    }
 }
 
@@ -476,6 +476,6 @@ i945_miptree_layout(struct intel_mipmap_tree * mt)
       break;
    }
 
-   DBG("%s: %dx%dx%d\n", __FUNCTION__,
+   DBG("%s: %dx%dx%d\n", __func__,
        mt->total_width, mt->total_height, mt->cpp);
 }