From: Kenneth Graunke Date: Fri, 13 Oct 2017 05:24:18 +0000 (-0700) Subject: i965: Remove the intel_miptree_prepare_fb_fetch wrapper. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa6ca6991bccea97fbb98c29fb02e2a195818b8c;p=mesa.git i965: Remove the intel_miptree_prepare_fb_fetch wrapper. Now that intel_miptree_prepare_texture takes levels and layers, there's not much use in this anymore. Reviewed-by: Topi Pohjolainen Reviewed-by; Jason Ekstrand --- diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 53d973f3761..486ada985d4 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -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); } } } diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 61b0a2dd49c..56105ef8af3 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -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, diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index 6dd097ac6d0..c24b5a35f85 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -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,