<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>
This hasn't been used outside intel_mipmap_tree.c since d5d4ba9 started<br>
using meta instead of the blitter for PBO TexSubImage.  While we're here,<br>
<br>
1. s/intel_miptree_\([^_]\)_raw/miptree_\1_raw/g because we don't<br>
generally prefix static functions.<br>
<br>
2. Remove the unused brw parameter from the function formerly known as<br>
intel_miptree_unmap_raw.<br>
<br>
Signed-off-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
---<br>
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 30 +++++++++++++++------------<br>
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h |  6 ------<br>
 2 files changed, 17 insertions(+), 19 deletions(-)<br>
<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 485752f..f68aba2 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c<br>
@@ -49,6 +49,11 @@<br>
<br>
 #define FILE_DEBUG_FLAG DEBUG_MIPTREE<br>
<br>
+static void *intel_miptree_map_raw(struct brw_context *brw,<br>
+                                   struct intel_mipmap_tree *mt);<br>
+<br>
+static void intel_miptree_unmap_raw(struct intel_mipmap_tree *mt);<br>
+<br>
 static bool<br>
 intel_miptree_alloc_mcs(struct brw_context *brw,<br>
                         struct intel_mipmap_tree *mt,<br>
@@ -1400,7 +1405,7 @@ intel_miptree_alloc_mcs(struct brw_context *brw,<br>
     */<br>
    void *data = intel_miptree_map_raw(brw, mt->mcs_mt);<br>
    memset(data, 0xff, mt->mcs_mt->total_height * mt->mcs_mt->pitch);<br>
-   intel_miptree_unmap_raw(brw, mt->mcs_mt);<br>
+   intel_miptree_unmap_raw(mt->mcs_mt);<br>
    mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_CLEAR;<br>
<br>
    return mt->mcs_mt;<br>
@@ -2072,8 +2077,7 @@ intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt)<br>
 }<br>
<br>
 void<br>
-intel_miptree_unmap_raw(struct brw_context *brw,<br>
-                        struct intel_mipmap_tree *mt)<br>
+intel_miptree_unmap_raw(struct intel_mipmap_tree *mt)<br></blockquote><div>I initially thought that you missed static keyword in function declaration.</div><div>But later realized it is valid if you have static in function declaration.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 {<br>
    drm_intel_bo_unmap(mt->bo);<br>
 }<br>
@@ -2130,7 +2134,7 @@ intel_miptree_unmap_gtt(struct brw_context *brw,<br>
                        unsigned int level,<br>
                        unsigned int slice)<br>
 {<br>
-   intel_miptree_unmap_raw(brw, mt);<br>
+   intel_miptree_unmap_raw(mt);<br>
 }<br>
<br>
 static void<br>
@@ -2191,7 +2195,7 @@ intel_miptree_unmap_blit(struct brw_context *brw,<br>
 {<br>
    struct gl_context *ctx = &brw->ctx;<br>
<br>
-   intel_miptree_unmap_raw(brw, map->mt);<br>
+   intel_miptree_unmap_raw(map->mt);<br>
<br>
    if (map->mode & GL_MAP_WRITE_BIT) {<br>
       bool ok = intel_miptree_blit(brw,<br>
@@ -2263,7 +2267,7 @@ intel_miptree_map_movntdqa(struct brw_context *brw,<br>
       _mesa_streaming_load_memcpy(dst_ptr, src_ptr, width_bytes);<br>
    }<br>
<br>
-   intel_miptree_unmap_raw(brw, mt);<br>
+   intel_miptree_unmap_raw(mt);<br>
 }<br>
<br>
 static void<br>
@@ -2312,7 +2316,7 @@ intel_miptree_map_s8(struct brw_context *brw,<br>
         }<br>
       }<br>
<br>
-      intel_miptree_unmap_raw(brw, mt);<br>
+      intel_miptree_unmap_raw(mt);<br>
<br>
       DBG("%s: %d,%d %dx%d from mt %p %d,%d = %p/%d\n", __func__,<br>
          map->x, map->y, map->w, map->h,<br>
@@ -2348,7 +2352,7 @@ intel_miptree_unmap_s8(struct brw_context *brw,<br>
         }<br>
       }<br>
<br>
-      intel_miptree_unmap_raw(brw, mt);<br>
+      intel_miptree_unmap_raw(mt);<br>
    }<br>
<br>
    free(map->buffer);<br>
@@ -2402,7 +2406,7 @@ intel_miptree_unmap_etc(struct brw_context *brw,<br>
                                map->ptr, map->stride,<br>
                                map->w, map->h, mt->etc_format);<br>
<br>
-   intel_miptree_unmap_raw(brw, mt);<br>
+   intel_miptree_unmap_raw(mt);<br>
    free(map->buffer);<br>
 }<br>
<br>
@@ -2472,8 +2476,8 @@ intel_miptree_map_depthstencil(struct brw_context *brw,<br>
         }<br>
       }<br>
<br>
-      intel_miptree_unmap_raw(brw, s_mt);<br>
-      intel_miptree_unmap_raw(brw, z_mt);<br>
+      intel_miptree_unmap_raw(s_mt);<br>
+      intel_miptree_unmap_raw(z_mt);<br>
<br>
       DBG("%s: %d,%d %dx%d from z mt %p %d,%d, s mt %p %d,%d = %p/%d\n",<br>
          __func__,<br>
@@ -2532,8 +2536,8 @@ intel_miptree_unmap_depthstencil(struct brw_context *brw,<br>
         }<br>
       }<br>
<br>
-      intel_miptree_unmap_raw(brw, s_mt);<br>
-      intel_miptree_unmap_raw(brw, z_mt);<br>
+      intel_miptree_unmap_raw(s_mt);<br>
+      intel_miptree_unmap_raw(z_mt);<br>
<br>
       DBG("%s: %d,%d %dx%d from z mt %p (%s) %d,%d, s mt %p %d,%d = %p/%d\n",<br>
          __func__,<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 d91d4be..93cbd62 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h<br>
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h<br>
@@ -774,12 +774,6 @@ brw_miptree_layout(struct brw_context *brw,<br>
                    struct intel_mipmap_tree *mt,<br>
                    uint32_t layout_flags);<br>
<br>
-void *intel_miptree_map_raw(struct brw_context *brw,<br>
-                            struct intel_mipmap_tree *mt);<br>
-<br>
-void intel_miptree_unmap_raw(struct brw_context *brw,<br>
-                             struct intel_mipmap_tree *mt);<br>
-<br>
 void<br>
 intel_miptree_map(struct brw_context *brw,<br>
                  struct intel_mipmap_tree *mt,<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">Reviewed-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>></div></div>