Module: Mesa
Branch: master
Commit: 507abc395940debf59df19d51fdff071cdb9f6ed
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=507abc395940debf59df19d51fdff071cdb9f6ed

Author: Lionel Landwerlin <[email protected]>
Date:   Wed Mar 18 20:03:53 2020 +0200

isl: drop min row pitch alignment when set by the driver

When the caller of the isl_surf_init() specifies a row pitch, do not
consider the minimum CCS requirement if it's incompatible with the
caller's value.

isl_surf_get_ccs_surf() will check that the main surface alignment
matches CCS expectations.

v2: Simplify checks (Nanley)

v3: Add Comment about isl_surf_get_ccs_surf() (Jason)

Signed-off-by: Lionel Landwerlin <[email protected]>
Cc: <[email protected]>
Fixes: a3f6db2c4e92 ("isl: drop CCS row pitch requirement for linear surfaces")
Reviewed-by: Nanley Chery <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Tested-by: Marge Bot 
<https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4243>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4243>

---

 src/intel/isl/isl.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index c6db6fb00b8..94778ac8594 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -1372,11 +1372,19 @@ isl_calc_row_pitch_alignment(const struct isl_device 
*dev,
    if (tile_info->tiling != ISL_TILING_LINEAR) {
       /* According to BSpec: 44930, Gen12's CCS-compressed surface pitches must
        * be 512B-aligned. CCS is only support on Y tilings.
+       *
+       * Only consider 512B alignment when :
+       *    - AUX is not explicitly disabled
+       *    - the caller has specified no pitch
+       *
+       * isl_surf_get_ccs_surf() will check that the main surface alignment
+       * matches CCS expectations.
        */
       if (ISL_DEV_GEN(dev) >= 12 &&
           isl_format_supports_ccs_e(dev->info, surf_info->format) &&
           tile_info->tiling != ISL_TILING_X &&
-          !(surf_info->usage & ISL_SURF_USAGE_DISABLE_AUX_BIT)) {
+          !(surf_info->usage & ISL_SURF_USAGE_DISABLE_AUX_BIT) &&
+          surf_info->row_pitch_B == 0) {
          return isl_align(tile_info->phys_extent_B.width, 512);
       }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to