summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorSamuel Iglesias Gonsálvez <[email protected]>2018-01-12 09:41:17 +0100
committerSamuel Iglesias Gonsálvez <[email protected]>2018-01-18 06:48:47 +0100
commiteac629deb68115e9ab520212c1af779eca4f38a3 (patch)
tree41bea6c754589b62bd6cda34fe20ef559c93ea8f /src/intel
parent9248f72c4e8513fdf4ac4cac4b78c9f06621046a (diff)
anv: return VK_ERROR_OUT_OF_DEVICE_MEMORY when surface size is out of HW limits
Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_image.c6
1 files 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;