[Mesa-dev] [PATCH 06/13] i965/miptree: Delete MIPTREE_CREATE_LINEAR

Nanley Chery nanleychery at gmail.com
Tue Jun 12 19:21:58 UTC 2018


This enum constant was introduced to enable blit maps with intel_miptree_create
da2880bea05bfc87109477ab026a7f5401fc8f0c. Now that such maps use the more
direct make_surface function which allows you to specify the tiling directly,
the constant is no longer being used.
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 11 ++---------
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h |  5 +----
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 2f7d648ec72..ca909c3fab7 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -703,8 +703,7 @@ miptree_create(struct brw_context *brw,
 
    const GLenum base_format = _mesa_get_format_base_format(format);
    if ((base_format == GL_DEPTH_COMPONENT ||
-        base_format == GL_DEPTH_STENCIL) &&
-       !(flags & MIPTREE_CREATE_LINEAR)) {
+        base_format == GL_DEPTH_STENCIL)) {
       /* Fix up the Z miptree format for how we're splitting out separate
        * stencil.  Gen7 expects there to be no stencil bits in its depth buffer.
        */
@@ -740,8 +739,7 @@ miptree_create(struct brw_context *brw,
    if (flags & MIPTREE_CREATE_BUSY)
       alloc_flags |= BO_ALLOC_BUSY;
 
-   isl_tiling_flags_t tiling_flags = (flags & MIPTREE_CREATE_LINEAR) ?
-      ISL_TILING_LINEAR_BIT : ISL_TILING_ANY_MASK;
+   isl_tiling_flags_t tiling_flags = ISL_TILING_ANY_MASK;
 
    /* TODO: This used to be because there wasn't BLORP to handle Y-tiling. */
    if (devinfo->gen < 6)
@@ -865,11 +863,6 @@ intel_miptree_create_for_bo(struct brw_context *brw,
     */
    assert(pitch >= 0);
 
-   /* The BO already has a tiling format and we shouldn't confuse the lower
-    * layers by making it try to find a tiling format again.
-    */
-   assert((flags & MIPTREE_CREATE_LINEAR) == 0);
-
    mt = make_surface(brw, target, format,
                      0, 0, width, height, depth, 1,
                      1lu << tiling,
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index ef8f51840cc..7c2341ab431 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -370,16 +370,13 @@ enum intel_miptree_create_flags {
     */
    MIPTREE_CREATE_BUSY     = 1 << 0,
 
-   /** Create a linear (not tiled) miptree */
-   MIPTREE_CREATE_LINEAR   = 1 << 1,
-
    /** Create the miptree with auxiliary compression disabled
     *
     * This does not prevent the caller of intel_miptree_create from coming
     * along later and turning auxiliary compression back on but it does mean
     * that the miptree will be created with mt->aux_usage == NONE.
     */
-   MIPTREE_CREATE_NO_AUX   = 1 << 2,
+   MIPTREE_CREATE_NO_AUX   = 1 << 1,
 };
 
 struct intel_mipmap_tree *intel_miptree_create(struct brw_context *brw,
-- 
2.17.0



More information about the mesa-dev mailing list