<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 7:18 PM, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
<br>
The target parameter of compute_msaa_layout appears to be unused since<br>
83b83fb when support for CMS textures was added for Gen7.<br>
<br>
The brw parameter of intel_get_non_msrt_mcs_alignment appears to be<br>
unused since e92fbdc when the GEN check (along with the "can we fast<br>
clear" decision) was moved to a different function.<br>
<br>
intel_mipmap_tree.c: In function 'compute_msaa_layout':<br>
intel_mipmap_tree.c:62:73: warning: unused parameter 'target' [-Wunused-parameter]<br>
 compute_msaa_layout(struct brw_context *brw, mesa_format format, GLenum target,<br>
                                                                         ^<br>
intel_mipmap_tree.c: In function 'intel_get_non_msrt_mcs_alignment':<br>
intel_mipmap_tree.c:143:54: warning: unused parameter 'brw' [-Wunused-parameter]<br>
 intel_get_non_msrt_mcs_alignment(struct brw_context *brw,<br>
                                                      ^<br>
<br>
Signed-off-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
Cc: Ben Widawsky <<a href="mailto:benjamin.widawsky@intel.com">benjamin.widawsky@intel.com</a>><br>
---<br>
 src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 8 ++++----<br>
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c   | 9 ++++-----<br>
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h   | 3 +--<br>
 3 files changed, 9 insertions(+), 11 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c<br>
index f5ecbb5..eb20173 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c<br>
+++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c<br>
@@ -204,7 +204,7 @@ brw_draw_rectlist(struct gl_context *ctx, struct rect *rect, int num_instances)<br>
 }<br>
<br>
 static void<br>
-get_fast_clear_rect(struct brw_context *brw, struct gl_framebuffer *fb,<br>
+get_fast_clear_rect(struct gl_framebuffer *fb,<br>
                     struct intel_renderbuffer *irb, struct rect *rect)<br>
 {<br>
    unsigned int x_align, y_align;<br>
@@ -226,7 +226,7 @@ get_fast_clear_rect(struct brw_context *brw, struct gl_framebuffer *fb,<br>
        * alignment size returned by intel_get_non_msrt_mcs_alignment(), but<br>
        * with X alignment multiplied by 16 and Y alignment multiplied by 32.<br>
        */<br>
-      intel_get_non_msrt_mcs_alignment(brw, irb->mt, &x_align, &y_align);<br>
+      intel_get_non_msrt_mcs_alignment(irb->mt, &x_align, &y_align);<br>
       x_align *= 16;<br>
       y_align *= 32;<br>
<br>
@@ -516,7 +516,7 @@ brw_meta_fast_clear(struct brw_context *brw, struct gl_framebuffer *fb,<br>
          irb->mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_RESOLVED;<br>
          irb->need_downsample = true;<br>
          fast_clear_buffers |= 1 << index;<br>
-         get_fast_clear_rect(brw, fb, irb, &fast_clear_rect);<br>
+         get_fast_clear_rect(fb, irb, &fast_clear_rect);<br>
          break;<br>
<br>
       case REP_CLEAR:<br>
@@ -653,7 +653,7 @@ get_resolve_rect(struct brw_context *brw,<br>
     * by 8 and 16 and 8 and 8 for SKL.<br>
     */<br>
<br>
-   intel_get_non_msrt_mcs_alignment(brw, mt, &x_align, &y_align);<br>
+   intel_get_non_msrt_mcs_alignment(mt, &x_align, &y_align);<br>
    if (brw->gen >= 9) {<br>
       x_scaledown = x_align * 8;<br>
       y_scaledown = y_align * 8;<br>
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c<br>
index 19f66b7..485752f 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c<br>
@@ -59,7 +59,7 @@ intel_miptree_alloc_mcs(struct brw_context *brw,<br>
  * created, based on the chip generation and the surface type.<br>
  */<br>
 static enum intel_msaa_layout<br>
-compute_msaa_layout(struct brw_context *brw, mesa_format format, GLenum target,<br>
+compute_msaa_layout(struct brw_context *brw, mesa_format format,<br>
                     bool disable_aux_buffers)<br>
 {<br>
    /* Prior to Gen7, all MSAA surfaces used IMS layout. */<br>
@@ -140,8 +140,7 @@ compute_msaa_layout(struct brw_context *brw, mesa_format format, GLenum target,<br>
  *   by half the block width, and Y coordinates by half the block height.<br>
  */<br>
 void<br>
-intel_get_non_msrt_mcs_alignment(struct brw_context *brw,<br>
-                                 struct intel_mipmap_tree *mt,<br>
+intel_get_non_msrt_mcs_alignment(struct intel_mipmap_tree *mt,<br>
                                  unsigned *width_px, unsigned *height)<br>
 {<br>
    switch (mt->tiling) {<br>
@@ -322,7 +321,7 @@ intel_miptree_create_layout(struct brw_context *brw,<br>
    if (num_samples > 1) {<br>
       /* Adjust width/height/depth for MSAA */<br>
       mt->msaa_layout = compute_msaa_layout(brw, format,<br>
-                                            mt->target, mt->disable_aux_buffers);<br>
+                                            mt->disable_aux_buffers);<br>
       if (mt->msaa_layout == INTEL_MSAA_LAYOUT_IMS) {<br>
          /* From the Ivybridge PRM, Volume 1, Part 1, page 108:<br>
           * "If the surface is multisampled and it is a depth or stencil<br>
@@ -1427,7 +1426,7 @@ intel_miptree_alloc_non_msrt_mcs(struct brw_context *brw,<br>
    const mesa_format format = MESA_FORMAT_R_UINT32;<br>
    unsigned block_width_px;<br>
    unsigned block_height;<br>
-   intel_get_non_msrt_mcs_alignment(brw, mt, &block_width_px, &block_height);<br>
+   intel_get_non_msrt_mcs_alignment(mt, &block_width_px, &block_height);<br>
    unsigned width_divisor = block_width_px * 4;<br>
    unsigned height_divisor = block_height * 8;<br>
    unsigned mcs_width =<br>
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h<br>
index c28162a..81e5f52 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h<br>
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h<br>
@@ -517,8 +517,7 @@ struct intel_mipmap_tree<br>
 };<br>
<br>
 void<br>
-intel_get_non_msrt_mcs_alignment(struct brw_context *brw,<br>
-                                 struct intel_mipmap_tree *mt,<br>
+intel_get_non_msrt_mcs_alignment(struct intel_mipmap_tree *mt,<br>
                                  unsigned *width_px, unsigned *height);<br>
 bool<br>
 intel_tiling_supports_non_msrt_mcs(struct brw_context *brw, unsigned tiling);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Reviewed-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>></div></div>