i965: Move unmap_movntdqa before map_movntdqa
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Apr 2018 17:25:42 +0000 (10:25 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 30 Apr 2018 21:06:23 +0000 (14:06 -0700)
Reorder code to avoid a forward declaration in the next patch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 22947c202c2aadc69f40495e88b1701d5feae752..0548ec2d8f5270292eb2da133df6df8d2d935e82 100644 (file)
@@ -3193,6 +3193,18 @@ fail:
  * "Map" a buffer by copying it to an untiled temporary using MOVNTDQA.
  */
 #if defined(USE_SSE41)
+static void
+intel_miptree_unmap_movntdqa(struct brw_context *brw,
+                             struct intel_mipmap_tree *mt,
+                             struct intel_miptree_map *map,
+                             unsigned int level,
+                             unsigned int slice)
+{
+   _mesa_align_free(map->buffer);
+   map->buffer = NULL;
+   map->ptr = NULL;
+}
+
 static void
 intel_miptree_map_movntdqa(struct brw_context *brw,
                            struct intel_mipmap_tree *mt,
@@ -3251,18 +3263,6 @@ intel_miptree_map_movntdqa(struct brw_context *brw,
 
    intel_miptree_unmap_raw(mt);
 }
-
-static void
-intel_miptree_unmap_movntdqa(struct brw_context *brw,
-                             struct intel_mipmap_tree *mt,
-                             struct intel_miptree_map *map,
-                             unsigned int level,
-                             unsigned int slice)
-{
-   _mesa_align_free(map->buffer);
-   map->buffer = NULL;
-   map->ptr = NULL;
-}
 #endif
 
 static void