summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c17
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.h2
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_validate.c6
3 files changed, 8 insertions, 17 deletions
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