mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
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>
This commit is contained in:
parent
0e85ff3355
commit
2c78b2ec90
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue