mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
anv/image: allow VK_IMAGE_CREATE_ALIAS_BIT with a private binding.
when the image is for video decoding. Signed-off-by: Hyunjun Ko <zzoon@igalia.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22202>
This commit is contained in:
parent
23c338af5d
commit
91235092ab
1 changed files with 3 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue