From eac629deb68115e9ab520212c1af779eca4f38a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20Iglesias=20Gons=C3=A1lvez?= Date: Fri, 12 Jan 2018 09:41:17 +0100 Subject: [PATCH] anv: return VK_ERROR_OUT_OF_DEVICE_MEMORY when surface size is out of HW limits MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Iglesias Gonsálvez Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_image.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 4d13e05e11f..72e408764d8 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -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; -- 2.30.2