From: Jason Ekstrand Date: Mon, 9 Oct 2017 22:08:33 +0000 (-0700) Subject: i965/miptree: Drop the invalidate parameter form copy_teximage X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92d3f21ec2783cb5a11b23b339178a8d09d62922;p=mesa.git i965/miptree: Drop the invalidate parameter form copy_teximage This was a leftover from i915. The one caller in i965 always passes in false so there's no point in having the parameter. Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 95bc48e6529..b57290e8238 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -1567,16 +1567,11 @@ intel_miptree_copy_slice(struct brw_context *brw, /** * Copies the image's current data to the given miptree, and associates that * miptree with the image. - * - * If \c invalidate is true, then the actual image data does not need to be - * copied, but the image still needs to be associated to the new miptree (this - * is set to true if we're about to clear the image). */ void intel_miptree_copy_teximage(struct brw_context *brw, struct intel_texture_image *intelImage, - struct intel_mipmap_tree *dst_mt, - bool invalidate) + struct intel_mipmap_tree *dst_mt) { struct intel_mipmap_tree *src_mt = intelImage->mt; struct intel_texture_object *intel_obj = @@ -1599,12 +1594,10 @@ intel_miptree_copy_teximage(struct brw_context *brw, end_layer = intelImage->base.Base.Depth - 1; } - if (!invalidate) { - for (unsigned i = start_layer; i <= end_layer; i++) { - intel_miptree_copy_slice(brw, - src_mt, level, i, - dst_mt, level, i); - } + for (unsigned i = start_layer; i <= end_layer; i++) { + intel_miptree_copy_slice(brw, + src_mt, level, i, + dst_mt, level, i); } intel_miptree_reference(&intelImage->mt, dst_mt); diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index 5ab929bb40b..48b07e4df6d 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -503,7 +503,7 @@ intel_miptree_copy_slice(struct brw_context *brw, void intel_miptree_copy_teximage(struct brw_context *brw, struct intel_texture_image *intelImage, - struct intel_mipmap_tree *dst_mt, bool invalidate); + struct intel_mipmap_tree *dst_mt); /** * \name Miptree HiZ functions diff --git a/src/mesa/drivers/dri/i965/intel_tex_validate.c b/src/mesa/drivers/dri/i965/intel_tex_validate.c index 2136467db0d..552db9210e2 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_validate.c +++ b/src/mesa/drivers/dri/i965/intel_tex_validate.c @@ -162,10 +162,8 @@ intel_finalize_mipmap_tree(struct brw_context *brw, GLuint unit) if (intelImage == NULL) break; - if (intelObj->mt != intelImage->mt) { - intel_miptree_copy_teximage(brw, intelImage, intelObj->mt, - false /* invalidate */); - } + if (intelObj->mt != intelImage->mt) + intel_miptree_copy_teximage(brw, intelImage, intelObj->mt); /* After we're done, we'd better agree that our layout is * appropriate, or we'll end up hitting this function again on the