From: Hyunjun Ko Date: Wed, 12 Apr 2023 05:24:44 +0000 (+0900) Subject: anv/image: allow VK_IMAGE_CREATE_ALIAS_BIT with a private binding. X-Git-Tag: upstream/23.3.3~8404 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91235092ab3a3c39f0d8fc48bbf59e483cc316c5;p=platform%2Fupstream%2Fmesa.git anv/image: allow VK_IMAGE_CREATE_ALIAS_BIT with a private binding. when the image is for video decoding. Signed-off-by: Hyunjun Ko Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 751e93c..267f783 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -974,10 +974,12 @@ check_memory_bindings(const struct anv_device *device, : ANV_IMAGE_MEMORY_BINDING_MAIN; /* Aliasing is incompatible with the private binding because it does not - * live in a VkDeviceMemory. The one exception is swapchain images. + * live in a VkDeviceMemory. The exception is either swapchain images or + * that the private binding is for a video motion vector buffer. */ assert(!(image->vk.create_flags & VK_IMAGE_CREATE_ALIAS_BIT) || image->from_wsi || + (plane->primary_surface.isl.usage & ISL_SURF_USAGE_VIDEO_DECODE_BIT) || image->bindings[ANV_IMAGE_MEMORY_BINDING_PRIVATE].memory_range.size == 0); /* Check primary surface */