summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/isl/isl_surface_state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index 0dfeeaf9044..3bb0abd5a72 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -258,6 +258,9 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
s.IntegerSurfaceFormat = isl_format_has_int_channel(s.SurfaceFormat);
#endif
+ assert(info->surf->logical_level0_px.width > 0 &&
+ info->surf->logical_level0_px.height > 0);
+
s.Width = info->surf->logical_level0_px.width - 1;
s.Height = info->surf->logical_level0_px.height - 1;