Commit a2c24ad9 authored by Samuel Iglesias Gonsálvez's avatar Samuel Iglesias Gonsálvez Committed by Andres Gomez

anv: vkBindImageMemory() should return VK_ERROR_OUT_OF_{HOST,DEVICE}_MEMORY on failure

According to the spec we get VK_ERROR_OUT_OF_HOST_MEMORY or
VK_ERROR_OUT_OF_DEVICE_MEMORY on vkBindImageMemory failure.

Fixes returned value changed by b546c9d3.

Fixes: b546c9d3 ("anv: anv_gem_mmap() returns MAP_FAILED as mapping error")
Signed-off-by: Samuel Iglesias Gonsálvez's avatarSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: "17.0 17.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 939b0157)
parent ce336813
......@@ -376,7 +376,7 @@ VkResult anv_BindImageMemory(
device->info.has_llc ? 0 : I915_MMAP_WC);
if (map == MAP_FAILED)
return vk_error(VK_ERROR_MEMORY_MAP_FAILED);
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
memset(map, 0, image->aux_surface.isl.size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment