mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
vulkan/wsi: Set MUTABLE_FORMAT_BIT in the prime path
Fixes:4bdf8547f4"vulkan/wsi: Implement VK_KHR_swapchain_mutable_format" Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031> (cherry picked from commit8299d5f37f)
This commit is contained in:
parent
d594032257
commit
675c2dabd3
2 changed files with 6 additions and 2 deletions
|
|
@ -3064,7 +3064,7 @@
|
|||
"description": "vulkan/wsi: Set MUTABLE_FORMAT_BIT in the prime path",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "4bdf8547f4dc1a383bf4e67110f44610a3790189"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -531,7 +531,7 @@ wsi_create_prime_image(const struct wsi_swapchain *chain,
|
|||
.sType = VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA,
|
||||
.prime_blit_src = true,
|
||||
};
|
||||
const VkImageCreateInfo image_info = {
|
||||
VkImageCreateInfo image_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
|
||||
.pNext = &image_wsi_info,
|
||||
.flags = 0,
|
||||
|
|
@ -552,6 +552,10 @@ wsi_create_prime_image(const struct wsi_swapchain *chain,
|
|||
.pQueueFamilyIndices = pCreateInfo->pQueueFamilyIndices,
|
||||
.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
};
|
||||
if (pCreateInfo->flags & VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR) {
|
||||
image_info.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT |
|
||||
VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR;
|
||||
}
|
||||
result = wsi->CreateImage(chain->device, &image_info,
|
||||
&chain->alloc, &image->image);
|
||||
if (result != VK_SUCCESS)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue