i965/miptree: Use isl_tiling_to_i915_tiling()
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Wed, 19 Jul 2017 17:30:30 +0000 (20:30 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 20 Jul 2017 08:32:21 +0000 (11:32 +0300)
and drop local copy.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_blit.h
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 5e4d1f5eb4acba62ef36962bb9adab407de7fe8f..2604417e2d5f47560835de1a368c66abe756363c 100644 (file)
 
 #include "brw_context.h"
 
-static inline unsigned
-isl_tiling_to_bufmgr_tiling(enum isl_tiling tiling)
-{
-   if (tiling == ISL_TILING_X)
-      return I915_TILING_X;
-
-   if (tiling == ISL_TILING_Y0)
-      return I915_TILING_Y;
-
-   /* All other are unknown to buffer allocator. */
-   return I915_TILING_NONE;
-}
-
 bool
 intelEmitCopyBlit(struct brw_context *brw,
                   GLuint cpp,
index 418ec3cf061dcb4db953657b69db33abf007ceb7..c6308e9456c2a190a99b8e8e249d3e646c5a9c66 100644 (file)
@@ -782,7 +782,7 @@ make_surface(struct brw_context *brw, GLenum target, mesa_format format,
    if (!bo) {
       mt->bo = brw_bo_alloc_tiled(brw->bufmgr, "isl-miptree",
                                   mt->surf.size,
-                                  isl_tiling_to_bufmgr_tiling(
+                                  isl_tiling_to_i915_tiling(
                                      mt->surf.tiling),
                                   mt->surf.row_pitch, alloc_flags);
       if (!mt->bo)