intel: Drop the "intel" argument to intel_miptree_release().
authorEric Anholt <eric@anholt.net>
Wed, 21 Sep 2011 22:34:35 +0000 (15:34 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 26 Sep 2011 22:33:42 +0000 (15:33 -0700)
We don't have it in the other refcounting functions, and it was
totally unused.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/intel/intel_fbo.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.c
src/mesa/drivers/dri/intel/intel_tex_image.c
src/mesa/drivers/dri/intel/intel_tex_validate.c

index 315108e4732e203b79b0bf959a186ce50e10c9bc..c0fb8d89bb5b9af7b9d1be8536b649bfd109815a 100644 (file)
@@ -747,7 +747,7 @@ intel_render_texture(struct gl_context * ctx,
                               intel_image->base.Base.Level,
                               old_mt);
 
-      intel_miptree_release(intel, &intel_image->mt);
+      intel_miptree_release(&intel_image->mt);
       intel_image->mt = new_mt;
       intel_renderbuffer_set_draw_offset(irb, intel_image, att->Zoffset);
 
index df9e45981a928965d8ab8772d2b820d354ad66af..fb4695ce6357e8282fa9f8cff16bb32f2f42ef3f 100644 (file)
@@ -180,8 +180,7 @@ intel_miptree_reference(struct intel_mipmap_tree **dst,
 
 
 void
-intel_miptree_release(struct intel_context *intel,
-                      struct intel_mipmap_tree **mt)
+intel_miptree_release(struct intel_mipmap_tree **mt)
 {
    if (!*mt)
       return;
index 0ecb469c060d5b07c28ffa3ebbe19a863cbdac99..0d4d2f91f7af9bd9a6dd6d0c68fe2b213d4e3908 100644 (file)
@@ -158,8 +158,7 @@ int intel_miptree_pitch_align (struct intel_context *intel,
 void intel_miptree_reference(struct intel_mipmap_tree **dst,
                              struct intel_mipmap_tree *src);
 
-void intel_miptree_release(struct intel_context *intel,
-                           struct intel_mipmap_tree **mt);
+void intel_miptree_release(struct intel_mipmap_tree **mt);
 
 /* Check if an image fits an existing mipmap tree layout
  */
index 3ce5b906b737ee440ac3a964fca862eb70087203..61e705c7d25789c9024a7c53d05f30774107c923 100644 (file)
@@ -43,10 +43,9 @@ static void
 intelDeleteTextureObject(struct gl_context *ctx,
                         struct gl_texture_object *texObj)
 {
-   struct intel_context *intel = intel_context(ctx);
    struct intel_texture_object *intelObj = intel_texture_object(texObj);
 
-   intel_miptree_release(intel, &intelObj->mt);
+   intel_miptree_release(&intelObj->mt);
    _mesa_delete_texture_object(ctx, texObj);
 }
 
@@ -55,12 +54,11 @@ static void
 intel_free_texture_image_buffer(struct gl_context * ctx,
                                struct gl_texture_image *texImage)
 {
-   struct intel_context *intel = intel_context(ctx);
    struct intel_texture_image *intelImage = intel_texture_image(texImage);
 
    DBG("%s\n", __FUNCTION__);
 
-   intel_miptree_release(intel, &intelImage->mt);
+   intel_miptree_release(&intelImage->mt);
 
    if (texImage->Data) {
       _mesa_free_texmemory(texImage->Data);
@@ -188,7 +186,7 @@ intelGenerateMipmap(struct gl_context *ctx, GLenum target,
                /* Unreference the miptree to signal that the new Data is a
                 * bare pointer from mesa.
                 */
-               intel_miptree_release(intel, &intelImage->mt);
+               intel_miptree_release(&intelImage->mt);
             }
          }
       }
index cbc9a49cb10e398e93f5a4769c57a0d4fea427ae..69da0e25d1ff9d4cb5cd108962cbe1e7301744f3 100644 (file)
@@ -392,7 +392,7 @@ intelTexImage(struct gl_context * ctx,
        * before, and any lower levels would fit into our miptree.
        */
       if (intelImage->mt) {
-        intel_miptree_release(intel, &intelObj->mt);
+        intel_miptree_release(&intelObj->mt);
         intel_miptree_reference(&intelObj->mt, intelImage->mt);
       }
    }
index 59f39def204a79fea74ba84910bf167a58e421e8..59354d66e34f1861c085e66cb413f3edd8f14c92 100644 (file)
@@ -44,7 +44,7 @@ copy_image_data_to_tree(struct intel_context *intel,
                                intelImage->base.Base.Face,
                                intelImage->base.Base.Level, intelImage->mt);
 
-      intel_miptree_release(intel, &intelImage->mt);
+      intel_miptree_release(&intelImage->mt);
    }
    else {
       assert(intelImage->base.Base.Data != NULL);
@@ -92,9 +92,7 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
    /* Fallback case:
     */
    if (firstImage->base.Base.Border) {
-      if (intelObj->mt) {
-         intel_miptree_release(intel, &intelObj->mt);
-      }
+      intel_miptree_release(&intelObj->mt);
       return GL_FALSE;
    }
 
@@ -114,7 +112,7 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
        intelObj->mt->width0 != firstImage->base.Base.Width ||
        intelObj->mt->height0 != firstImage->base.Base.Height ||
        intelObj->mt->depth0 != firstImage->base.Base.Depth)) {
-      intel_miptree_release(intel, &intelObj->mt);
+      intel_miptree_release(&intelObj->mt);
    }