From: Eric Anholt Date: Wed, 4 Nov 2009 21:41:48 +0000 (-0800) Subject: intel: Remove duplicated arguments from intel_miptree_match_image(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8f30ceaaefc33401b08739a16ce1c5638d6432fa;p=mesa.git intel: Remove duplicated arguments from intel_miptree_match_image(). --- diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index 2a19816e12e..e082ebc799c 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -315,10 +315,11 @@ intel_miptree_release(struct intel_context *intel, */ GLboolean intel_miptree_match_image(struct intel_mipmap_tree *mt, - struct gl_texture_image *image, - GLuint face, GLuint level) + struct gl_texture_image *image) { GLboolean isCompressed = _mesa_is_format_compressed(image->TexFormat); + struct intel_texture_image *intelImage = intel_texture_image(image); + GLuint level = intelImage->level; /* Images with borders are never pulled into mipmap trees. */ diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h index 3bce54daa15..b19c548def3 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h @@ -165,8 +165,7 @@ void intel_miptree_release(struct intel_context *intel, /* Check if an image fits an existing mipmap tree layout */ GLboolean intel_miptree_match_image(struct intel_mipmap_tree *mt, - struct gl_texture_image *image, - GLuint face, GLuint level); + struct gl_texture_image *image); /* Return a pointer to an image within a tree. Return image stride as * well. diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 3412e761ca9..0644277c058 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -368,8 +368,7 @@ intelTexImage(GLcontext * ctx, intelObj->mt->first_level == level && intelObj->mt->last_level == level && intelObj->mt->target != GL_TEXTURE_CUBE_MAP_ARB && - !intel_miptree_match_image(intelObj->mt, &intelImage->base, - intelImage->face, intelImage->level)) { + !intel_miptree_match_image(intelObj->mt, &intelImage->base)) { DBG("release it\n"); intel_miptree_release(intel, &intelObj->mt); @@ -386,8 +385,7 @@ intelTexImage(GLcontext * ctx, assert(!intelImage->mt); if (intelObj->mt && - intel_miptree_match_image(intelObj->mt, &intelImage->base, - intelImage->face, intelImage->level)) { + intel_miptree_match_image(intelObj->mt, &intelImage->base)) { intel_miptree_reference(&intelImage->mt, intelObj->mt); assert(intelImage->mt); @@ -797,8 +795,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, texImage->RowStride = rb->region->pitch; intel_miptree_reference(&intelImage->mt, intelObj->mt); - if (!intel_miptree_match_image(intelObj->mt, &intelImage->base, - intelImage->face, intelImage->level)) { + if (!intel_miptree_match_image(intelObj->mt, &intelImage->base)) { fprintf(stderr, "miptree doesn't match image\n"); }