[Mesa-dev] [PATCH] intel/isl: Add assertion for aux surface pitch
Anuj Phogat
anuj.phogat at gmail.com
Tue Feb 6 00:07:19 UTC 2018
I don't have a test case hitting this assert. But, it's nice to have
an assert checking the limit.
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
src/intel/isl/isl_surface_state.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index bfb27fa4a4..afd4b80ddb 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -566,6 +566,8 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
s.AuxiliarySurfaceBaseAddress = info->aux_address;
s.AuxiliarySurfacePitch = pitch_in_tiles - 1;
+ assert(s.AuxiliarySurfacePitch <= 511);
+
#if GEN_GEN >= 8
assert(GEN_GEN >= 9 || info->aux_usage != ISL_AUX_USAGE_CCS_E);
/* Auxiliary surfaces in ISL have compressed formats but the hardware
--
2.13.6
More information about the mesa-dev
mailing list