[Mesa-dev] [PATCH v3 6/8] intel/isl: Remove tiling checks from choose_msaa_layout

Jason Ekstrand jason at jlekstrand.net
Tue Sep 27 16:22:03 UTC 2016


We already do those checks in filter_tiling.  There's no good reason to
repeat them in choose_msaa_layout.  If anything they should have been
asserts and not "return false" checks.  Also, this check was causing us to
outright reject multisampled HiZ surfaces which wasn't intended.

Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Chad Versace <chadversary at chromium.org>
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>
---
 src/intel/isl/isl_gen7.c | 10 +++++++---
 src/intel/isl/isl_gen8.c | 11 -----------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/src/intel/isl/isl_gen7.c b/src/intel/isl/isl_gen7.c
index 316b51b..5b4f0d4 100644
--- a/src/intel/isl/isl_gen7.c
+++ b/src/intel/isl/isl_gen7.c
@@ -249,9 +249,13 @@ gen7_filter_tiling(const struct isl_device *dev,
        *   For multisample render targets, this field must be 1 (true). MSRTs
        *   can only be tiled.
        *
-       * Multisample surfaces never require X tiling, and Y tiling generally
-       * performs better than X. So choose Y. (Unless it's stencil, then it
-       * must be W).
+       * From the Broadwell PRM >> Volume2d: Command Structures >>
+       * RENDER_SURFACE_STATE Tile Mode:
+       *
+       *   If Number of Multisamples is not MULTISAMPLECOUNT_1, this field
+       *   must be YMAJOR.
+       *
+       * As usual, though, stencil is special and requires W-tiling.
        */
       *flags &= (ISL_TILING_ANY_Y_MASK | ISL_TILING_W_BIT);
    }
diff --git a/src/intel/isl/isl_gen8.c b/src/intel/isl/isl_gen8.c
index 0049614..2d7f41f 100644
--- a/src/intel/isl/isl_gen8.c
+++ b/src/intel/isl/isl_gen8.c
@@ -41,17 +41,6 @@ gen8_choose_msaa_layout(const struct isl_device *dev,
    }
 
    /* From the Broadwell PRM >> Volume2d: Command Structures >>
-    * RENDER_SURFACE_STATE Tile Mode:
-    *
-    *    - If Number of Multisamples is not MULTISAMPLECOUNT_1, this field
-    *      must be YMAJOR.
-    *
-    * As usual, though, stencil is special.
-    */
-   if (!isl_tiling_is_any_y(tiling) && !isl_surf_usage_is_stencil(info->usage))
-      return false;
-
-   /* From the Broadwell PRM >> Volume2d: Command Structures >>
     * RENDER_SURFACE_STATE Multisampled Surface Storage Format:
     *
     *    All multisampled render target surfaces must have this field set to
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list