i965: Remove the intel_miptree_prepare_fb_fetch wrapper.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 13 Oct 2017 05:24:18 +0000 (22:24 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 19 Oct 2017 18:10:00 +0000 (11:10 -0700)
Now that intel_miptree_prepare_texture takes levels and layers, there's
not much use in this anymore.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by; Jason Ekstrand <jason@jlekstrand.net>

src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h

index 53d973f3761542c387996549175e450ada84d19f..486ada985d46903a0afd080cfa35a105c50b9c2e 100644 (file)
@@ -473,13 +473,20 @@ brw_predraw_resolve_framebuffer(struct brw_context *brw)
        ctx->FragmentProgram._Current->info.outputs_read) {
       const struct gl_framebuffer *fb = ctx->DrawBuffer;
 
+      /* This is only used for non-coherent framebuffer fetch, so we don't
+       * need to worry about CCS_E and can simply pass 'false' below.
+       */
+      assert(brw->screen->devinfo.gen < 9);
+
       for (unsigned i = 0; i < fb->_NumColorDrawBuffers; i++) {
          const struct intel_renderbuffer *irb =
             intel_renderbuffer(fb->_ColorDrawBuffers[i]);
 
          if (irb) {
-            intel_miptree_prepare_fb_fetch(brw, irb->mt, irb->mt_level,
-                                           irb->mt_layer, irb->layer_count);
+            intel_miptree_prepare_texture(brw, irb->mt, irb->mt->surf.format,
+                                          irb->mt_level, 1,
+                                          irb->mt_layer, irb->layer_count,
+                                          false);
          }
       }
    }
index 61b0a2dd49cdff5667d8dfe2db89f0c0d9e8a983..56105ef8af3325aacf132d6c53ef9454bf6f7c58 100644 (file)
@@ -2651,20 +2651,6 @@ intel_miptree_prepare_image(struct brw_context *brw,
                                 ISL_AUX_USAGE_NONE, false);
 }
 
-void
-intel_miptree_prepare_fb_fetch(struct brw_context *brw,
-                               struct intel_mipmap_tree *mt, uint32_t level,
-                               uint32_t start_layer, uint32_t num_layers)
-{
-   /* This is only used for non-coherent framebuffer fetch, so we don't
-    * need to worry about CCS_E and can simply pass 'false' below.
-    */
-   assert(brw->screen->devinfo.gen < 9);
-
-   intel_miptree_prepare_texture(brw, mt, mt->surf.format, level, 1,
-                                 start_layer, num_layers, false);
-}
-
 enum isl_aux_usage
 intel_miptree_render_aux_usage(struct brw_context *brw,
                                struct intel_mipmap_tree *mt,
index 6dd097ac6d0c703773e3f0fcc08c0682978f2d3a..c24b5a35f85cb7a98253522bb09381de6e47e8f1 100644 (file)
@@ -646,10 +646,7 @@ intel_miptree_prepare_texture(struct brw_context *brw,
 void
 intel_miptree_prepare_image(struct brw_context *brw,
                             struct intel_mipmap_tree *mt);
-void
-intel_miptree_prepare_fb_fetch(struct brw_context *brw,
-                               struct intel_mipmap_tree *mt, uint32_t level,
-                               uint32_t start_layer, uint32_t num_layers);
+
 enum isl_aux_usage
 intel_miptree_render_aux_usage(struct brw_context *brw,
                                struct intel_mipmap_tree *mt,