intel: Silence several "warning: unused parameter"
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 26 Aug 2011 16:57:51 +0000 (09:57 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 9 Sep 2011 19:01:51 +0000 (12:01 -0700)
The intel_context and tiling parameters were not used by any if the
i9[14]5_miptree_layout or the functions they call, and the tiling parameter was
not used by brw_miptree_layout.  Remove the unnecessary parameters.

src/mesa/drivers/dri/i915/i915_tex_layout.c
src/mesa/drivers/dri/i965/brw_tex_layout.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
src/mesa/drivers/dri/intel/intel_mipmap_tree.h
src/mesa/drivers/dri/intel/intel_tex_layout.c
src/mesa/drivers/dri/intel/intel_tex_layout.h

index e6a471162239a4ac21676b8c9c27743b6c21c561..45ca38e75d5d54f30d31e00687b41ca65493b491 100644 (file)
@@ -112,9 +112,7 @@ static GLint bottom_offsets[6] = {
  *
  */
 static void
-i915_miptree_layout_cube(struct intel_context *intel,
-                        struct intel_mipmap_tree * mt,
-                        uint32_t tiling)
+i915_miptree_layout_cube(struct intel_mipmap_tree * mt)
 {
    const GLuint dim = mt->width0;
    GLuint face;
@@ -156,9 +154,7 @@ i915_miptree_layout_cube(struct intel_context *intel,
 }
 
 static void
-i915_miptree_layout_3d(struct intel_context *intel,
-                      struct intel_mipmap_tree * mt,
-                      uint32_t tiling)
+i915_miptree_layout_3d(struct intel_mipmap_tree * mt)
 {
    GLuint width = mt->width0;
    GLuint height = mt->height0;
@@ -201,9 +197,7 @@ i915_miptree_layout_3d(struct intel_context *intel,
 }
 
 static void
-i915_miptree_layout_2d(struct intel_context *intel,
-                      struct intel_mipmap_tree * mt,
-                      uint32_t tiling)
+i915_miptree_layout_2d(struct intel_mipmap_tree * mt)
 {
    GLuint width = mt->width0;
    GLuint height = mt->height0;
@@ -231,20 +225,19 @@ i915_miptree_layout_2d(struct intel_context *intel,
 }
 
 GLboolean
-i915_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt,
-                   uint32_t tiling)
+i915_miptree_layout(struct intel_mipmap_tree * mt)
 {
    switch (mt->target) {
    case GL_TEXTURE_CUBE_MAP:
-      i915_miptree_layout_cube(intel, mt, tiling);
+      i915_miptree_layout_cube(mt);
       break;
    case GL_TEXTURE_3D:
-      i915_miptree_layout_3d(intel, mt, tiling);
+      i915_miptree_layout_3d(mt);
       break;
    case GL_TEXTURE_1D:
    case GL_TEXTURE_2D:
    case GL_TEXTURE_RECTANGLE_ARB:
-      i915_miptree_layout_2d(intel, mt, tiling);
+      i915_miptree_layout_2d(mt);
       break;
    default:
       _mesa_problem(NULL, "Unexpected tex target in i915_miptree_layout()");
@@ -319,9 +312,7 @@ i915_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt,
  */
 
 static void
-i945_miptree_layout_cube(struct intel_context *intel,
-                        struct intel_mipmap_tree * mt,
-                        uint32_t tiling)
+i945_miptree_layout_cube(struct intel_mipmap_tree * mt)
 {
    const GLuint dim = mt->width0;
    GLuint face;
@@ -411,9 +402,7 @@ i945_miptree_layout_cube(struct intel_context *intel,
 }
 
 static void
-i945_miptree_layout_3d(struct intel_context *intel,
-                      struct intel_mipmap_tree * mt,
-                      uint32_t tiling)
+i945_miptree_layout_3d(struct intel_mipmap_tree * mt)
 {
    GLuint width = mt->width0;
    GLuint height = mt->height0;
@@ -467,23 +456,22 @@ i945_miptree_layout_3d(struct intel_context *intel,
 }
 
 GLboolean
-i945_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt,
-                   uint32_t tiling)
+i945_miptree_layout(struct intel_mipmap_tree * mt)
 {
    switch (mt->target) {
    case GL_TEXTURE_CUBE_MAP:
       if (mt->compressed)
-        i945_miptree_layout_cube(intel, mt, tiling);
+        i945_miptree_layout_cube(mt);
       else
-        i915_miptree_layout_cube(intel, mt, tiling);
+        i915_miptree_layout_cube(mt);
       break;
    case GL_TEXTURE_3D:
-      i945_miptree_layout_3d(intel, mt, tiling);
+      i945_miptree_layout_3d(mt);
       break;
    case GL_TEXTURE_1D:
    case GL_TEXTURE_2D:
    case GL_TEXTURE_RECTANGLE_ARB:
-      i945_miptree_layout_2d(intel, mt, tiling, 1);
+      i945_miptree_layout_2d(mt, 1);
       break;
    default:
       _mesa_problem(NULL, "Unexpected tex target in i945_miptree_layout()");
index b5d2cf31290560a4beaa9f46a4a9c9b2293fcb2d..16ce8f68b81ce5e61451b4e8507c357cd555cc1c 100644 (file)
@@ -40,8 +40,7 @@
 #define FILE_DEBUG_FLAG DEBUG_MIPTREE
 
 GLboolean brw_miptree_layout(struct intel_context *intel,
-                            struct intel_mipmap_tree *mt,
-                            uint32_t tiling)
+                            struct intel_mipmap_tree *mt)
 {
    /* XXX: these vary depending on image format: */
    /* GLint align_w = 4; */
@@ -68,7 +67,7 @@ GLboolean brw_miptree_layout(struct intel_context *intel,
           if (mt->compressed)
             qpitch /= 4;
 
-         i945_miptree_layout_2d(intel, mt, tiling, 6);
+         i945_miptree_layout_2d(mt, 6);
 
           for (level = mt->first_level; level <= mt->last_level; level++) {
             for (q = 0; q < 6; q++) {
@@ -162,7 +161,7 @@ GLboolean brw_miptree_layout(struct intel_context *intel,
    }
 
    default:
-      i945_miptree_layout_2d(intel, mt, tiling, 1);
+      i945_miptree_layout_2d(mt, 1);
       break;
    }
    DBG("%s: %dx%dx%d\n", __FUNCTION__,
index f36240d7f1d3799a6830fab23b78bbc2398786f2..72cdd4c0f115b5b595be4be19dff75b02fe07b98 100644 (file)
@@ -61,8 +61,7 @@ intel_miptree_create_internal(struct intel_context *intel,
                              GLuint last_level,
                              GLuint width0,
                              GLuint height0,
-                             GLuint depth0,
-                             uint32_t tiling)
+                             GLuint depth0)
 {
    GLboolean ok;
    struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1);
@@ -88,12 +87,13 @@ intel_miptree_create_internal(struct intel_context *intel,
    mt->refcount = 1; 
 
 #ifdef I915
+   (void) intel;
    if (intel->is_945)
-      ok = i945_miptree_layout(intel, mt, tiling);
+      ok = i945_miptree_layout(mt);
    else
-      ok = i915_miptree_layout(intel, mt, tiling);
+      ok = i915_miptree_layout(mt);
 #else
-   ok = brw_miptree_layout(intel, mt, tiling);
+   ok = brw_miptree_layout(intel, mt);
 #endif
 
    if (!ok) {
@@ -132,8 +132,7 @@ intel_miptree_create(struct intel_context *intel,
 
    mt = intel_miptree_create_internal(intel, target, format,
                                      first_level, last_level, width0,
-                                     height0, depth0,
-                                     tiling);
+                                     height0, depth0);
    /*
     * pitch == 0 || height == 0  indicates the null texture
     */
@@ -169,8 +168,7 @@ intel_miptree_create_for_region(struct intel_context *intel,
 
    mt = intel_miptree_create_internal(intel, target, format,
                                      0, 0,
-                                     region->width, region->height, 1,
-                                     I915_TILING_NONE);
+                                     region->width, region->height, 1);
    if (!mt)
       return mt;
 
index ea865904f6843b7d9bcba46acb06b977a1e3c5c6..ff746d77f9684c1695ba358d49a6ef33419ff391 100644 (file)
@@ -212,14 +212,9 @@ void intel_miptree_image_copy(struct intel_context *intel,
 
 /* i915_mipmap_tree.c:
  */
-GLboolean i915_miptree_layout(struct intel_context *intel,
-                             struct intel_mipmap_tree *mt,
-                             uint32_t tiling);
-GLboolean i945_miptree_layout(struct intel_context *intel,
-                             struct intel_mipmap_tree *mt,
-                             uint32_t tiling);
+GLboolean i915_miptree_layout(struct intel_mipmap_tree *mt);
+GLboolean i945_miptree_layout(struct intel_mipmap_tree *mt);
 GLboolean brw_miptree_layout(struct intel_context *intel,
-                            struct intel_mipmap_tree *mt,
-                            uint32_t tiling);
+                            struct intel_mipmap_tree *mt);
 
 #endif
index 9d8152375d8317743e71cf68498428c3f00b9c3a..e796aaf00450ca74b27dff60de5b766252d6ec97 100644 (file)
@@ -50,9 +50,7 @@ intel_get_texture_alignment_unit(gl_format format,
    }
 }
 
-void i945_miptree_layout_2d(struct intel_context *intel,
-                           struct intel_mipmap_tree *mt,
-                           uint32_t tiling, int nr_images)
+void i945_miptree_layout_2d(struct intel_mipmap_tree *mt, int nr_images)
 {
    GLuint align_h, align_w;
    GLuint level;
index b52e5a48855552f531c95e02f926cf9868bbbd87..257c07ce476b48d214687d82e2c21e7772c18906 100644 (file)
@@ -38,8 +38,7 @@ static INLINE GLuint minify( GLuint d )
    return MAX2(1, d>>1);
 }
 
-extern void i945_miptree_layout_2d(struct intel_context *intel,
-                                  struct intel_mipmap_tree *mt,
-                                  uint32_t tiling, int nr_images);
+extern void i945_miptree_layout_2d(struct intel_mipmap_tree *mt,
+                                  int nr_images);
 void intel_get_texture_alignment_unit(gl_format format,
                                      unsigned int *w, unsigned int *h);