anv/image: Fix tiling if VkImageSwapchainCreateInfoKHR
We incorrectly used VK_IMAGE_TILING_OPTIMAL when the original swapchain image had VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. When we soon begin using a different memory layout for modifier images, this mismatch would have produced undefined behavior. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466>
This commit is contained in:
parent
de870cc4b2
commit
12e8e20802
|
@ -1042,6 +1042,7 @@ anv_image_from_swapchain(VkDevice device,
|
||||||
* #swapchain-wsi-image-create-info .
|
* #swapchain-wsi-image-create-info .
|
||||||
*/
|
*/
|
||||||
assert(local_create_info.tiling == VK_IMAGE_TILING_OPTIMAL);
|
assert(local_create_info.tiling == VK_IMAGE_TILING_OPTIMAL);
|
||||||
|
local_create_info.tiling = swapchain_image->tiling;
|
||||||
|
|
||||||
VkImageDrmFormatModifierListCreateInfoEXT local_modifier_info = {
|
VkImageDrmFormatModifierListCreateInfoEXT local_modifier_info = {
|
||||||
.sType = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT,
|
.sType = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT,
|
||||||
|
|
Loading…
Reference in New Issue