mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 18:38:11 +02:00
anv: don't try to access Android swapchains
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5180 Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12217>
This commit is contained in:
parent
0869703300
commit
bc3c71b87a
1 changed files with 6 additions and 0 deletions
|
|
@ -1477,11 +1477,17 @@ anv_CreateImage(VkDevice device,
|
||||||
return anv_image_from_gralloc(device, pCreateInfo, gralloc_info,
|
return anv_image_from_gralloc(device, pCreateInfo, gralloc_info,
|
||||||
pAllocator, pImage);
|
pAllocator, pImage);
|
||||||
|
|
||||||
|
#ifndef VK_USE_PLATFORM_ANDROID_KHR
|
||||||
|
/* Ignore swapchain creation info on Android. Since we don't have an
|
||||||
|
* implementation in Mesa, we're guaranteed to access an Android object
|
||||||
|
* incorrectly.
|
||||||
|
*/
|
||||||
const VkImageSwapchainCreateInfoKHR *swapchain_info =
|
const VkImageSwapchainCreateInfoKHR *swapchain_info =
|
||||||
vk_find_struct_const(pCreateInfo->pNext, IMAGE_SWAPCHAIN_CREATE_INFO_KHR);
|
vk_find_struct_const(pCreateInfo->pNext, IMAGE_SWAPCHAIN_CREATE_INFO_KHR);
|
||||||
if (swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE)
|
if (swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE)
|
||||||
return anv_image_from_swapchain(device, pCreateInfo, swapchain_info,
|
return anv_image_from_swapchain(device, pCreateInfo, swapchain_info,
|
||||||
pAllocator, pImage);
|
pAllocator, pImage);
|
||||||
|
#endif
|
||||||
|
|
||||||
return anv_image_create(device,
|
return anv_image_create(device,
|
||||||
&(struct anv_image_create_info) {
|
&(struct anv_image_create_info) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue