i965/miptree: Drop the invalidate parameter form copy_teximage
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 9 Oct 2017 22:08:33 +0000 (15:08 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 16 Oct 2017 15:06:02 +0000 (08:06 -0700)
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 <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h
src/mesa/drivers/dri/i965/intel_tex_validate.c

index 95bc48e6529417c97e3d8bd46a004a27a83fd627..b57290e8238a5689b1854c481c01ef172c7fe024 100644 (file)
@@ -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);
index 5ab929bb40b1ed5a35b185a17ceba13fb9474f0d..48b07e4df6dd30883d246ade5d2701da4584d888 100644 (file)
@@ -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
index 2136467db0df8ad2ef0bd2acfa16e5acd6f5b545..552db9210e278d0e056df5d8ec413ffdb2841a0f 100644 (file)
@@ -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