isl: only apply main surface ccs pitch constraint with CCS
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 20 Feb 2020 14:16:33 +0000 (16:16 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 19 Mar 2020 19:17:10 +0000 (19:17 +0000)
We could be creating a Y-tiled surface that isn't going to use CCS
(this could be the case when clearly indicated through modifiers).
Don't apply the main surface pitch alignment constraint in that case.

v2: Use logical NOT (Sagar)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a3f6db2c4e92 ("isl: drop CCS row pitch requirement for linear surfaces")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4243>

src/intel/isl/isl.c

index 877dd8a1cdb8dfa7897fbb27e5ac26924d4a4485..c6db6fb00b84c4759922b359a1916b609e9959c4 100644 (file)
@@ -1375,7 +1375,8 @@ isl_calc_row_pitch_alignment(const struct isl_device *dev,
        */
       if (ISL_DEV_GEN(dev) >= 12 &&
           isl_format_supports_ccs_e(dev->info, surf_info->format) &&
-          tile_info->tiling != ISL_TILING_X) {
+          tile_info->tiling != ISL_TILING_X &&
+          !(surf_info->usage & ISL_SURF_USAGE_DISABLE_AUX_BIT)) {
          return isl_align(tile_info->phys_extent_B.width, 512);
       }