anv: return VK_ERROR_OUT_OF_DEVICE_MEMORY when surface size is out of HW limits

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Samuel Iglesias Gonsálvez 2018-01-12 09:41:17 +01:00
parent 9248f72c4e
commit eac629deb6

View file

@ -335,10 +335,8 @@ make_surface(const struct anv_device *dev,
.usage = usage,
.tiling_flags = tiling_flags);
/* isl_surf_init() will fail only if provided invalid input. Invalid input
* is illegal in Vulkan.
*/
assert(ok);
if (!ok)
return VK_ERROR_OUT_OF_DEVICE_MEMORY;
image->planes[plane].aux_usage = ISL_AUX_USAGE_NONE;