[Mesa-dev] [PATCH 01/17] intel/isl: Add missing stencil pitch validation
Topi Pohjolainen
topi.pohjolainen at gmail.com
Fri Jul 21 15:00:52 UTC 2017
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/intel/isl/isl.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 7d1356f0ac..4393088409 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -1316,8 +1316,10 @@ isl_calc_row_pitch(const struct isl_device *dev,
!pitch_in_range(row_pitch, _3DSTATE_HIER_DEPTH_BUFFER_SurfacePitch_bits(dev->info)))
return false;
- if (surf_info->usage & ISL_SURF_USAGE_STENCIL_BIT)
- isl_finishme("validate row pitch of stencil surfaces");
+ if ((surf_info->usage & ISL_SURF_USAGE_STENCIL_BIT) &&
+ !pitch_in_range(row_pitch,
+ _3DSTATE_STENCIL_BUFFER_SurfacePitch_bits(dev->info)))
+ return false;
done:
*out_row_pitch = row_pitch;
--
2.11.0
More information about the mesa-dev
mailing list