mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
anv/image: Update usage flags for multisample images
Meta resolves multisample images by binding them as textures. Therefore we must add VK_IMAGE_USAGE_SAMPLED_BIT.
This commit is contained in:
parent
608b411e9f
commit
2bab3cd681
1 changed files with 6 additions and 0 deletions
|
|
@ -158,6 +158,12 @@ anv_image_get_full_usage(const VkImageCreateInfo *info)
|
|||
{
|
||||
VkImageUsageFlags usage = info->usage;
|
||||
|
||||
if (info->samples > 1 &&
|
||||
(usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT)) {
|
||||
/* Meta will resolve the image by binding it as a texture. */
|
||||
usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
}
|
||||
|
||||
if (usage & VK_IMAGE_USAGE_TRANSFER_SRC_BIT) {
|
||||
/* Meta will transfer from the image by binding it as a texture. */
|
||||
usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue