[Mesa-dev] [PATCH] isl: take tilesize into account in isl_calc_row_pitch checks

Tapani Pälli tapani.palli at intel.com
Thu Mar 30 07:17:48 UTC 2017


Function isl_calc_min_row_pitch multiplies pitch by tilesize but the
checks in isl_calc_row_pitch do not take this to account when comparing
against caller provided row_pitch.

Fixes: e9017d5 ("isl: Let isl_surf_init's caller set the exact row pitch (v2)")
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 src/intel/isl/isl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 98a1152..a77016b 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -1125,7 +1125,7 @@ isl_calc_row_pitch(const struct isl_device *dev,
    uint32_t row_pitch = min_row_pitch;
 
    if (surf_info->row_pitch != 0) {
-      row_pitch = surf_info->row_pitch;
+      row_pitch = surf_info->row_pitch * tile_info->phys_extent_B.width;
 
       if (row_pitch < min_row_pitch)
          return false;
-- 
2.9.3



More information about the mesa-dev mailing list