diff options
author | Anuj Phogat <anuj.phogat@gmail.com> | 2016-09-20 11:59:01 -0700 |
---|---|---|
committer | Anuj Phogat <anuj.phogat@gmail.com> | 2016-10-04 13:20:34 -0700 |
commit | 2c78b2ec901ca87698b5f5fadb547e0fc727800d (patch) | |
tree | 3bab7fd234a05d2445c5f261e61b184f07ab60de /src/intel | |
parent | 0e85ff335522085a61d5d205879bcf8d6e69efa4 (diff) |
intel/isl: Add an assert to check zero width/height surface
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/isl/isl_surface_state.c | 3 |
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 0dfeeaf904..3bb0abd5a7 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; |