mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
dzn: Check image view usage instead of image usage when creating an image view
So we take VkImageViewUsageCreateInfo extension instead of ignoring it. Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15698>
This commit is contained in:
parent
7ecc22ccaa
commit
653c362ca6
1 changed files with 4 additions and 4 deletions
|
|
@ -1059,7 +1059,7 @@ dzn_image_view_init(dzn_device *device,
|
|||
assert(range->baseMipLevel < image->vk.mip_levels);
|
||||
|
||||
/* View usage should be a subset of image usage */
|
||||
assert(image->vk.usage & (VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
|
||||
assert(iview->vk.usage & (VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
|
||||
VK_IMAGE_USAGE_SAMPLED_BIT |
|
||||
VK_IMAGE_USAGE_STORAGE_BIT |
|
||||
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
|
||||
|
|
@ -1081,13 +1081,13 @@ dzn_image_view_init(dzn_device *device,
|
|||
|
||||
dzn_image_view_prepare_srv_desc(iview);
|
||||
|
||||
if (image->vk.usage & VK_IMAGE_USAGE_STORAGE_BIT)
|
||||
if (iview->vk.usage & VK_IMAGE_USAGE_STORAGE_BIT)
|
||||
dzn_image_view_prepare_uav_desc(iview);
|
||||
|
||||
if (image->vk.usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
|
||||
if (iview->vk.usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
|
||||
dzn_image_view_prepare_rtv_desc(iview);
|
||||
|
||||
if (image->vk.usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)
|
||||
if (iview->vk.usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)
|
||||
dzn_image_view_prepare_dsv_desc(iview);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue