anv: Refactor anv_image_init_from_create_info

Use a variable to store the anv_image_create_info struct. We'll modify it for a
bug fix in the next patch.

Cc: 22.0 <mesa-stable>
Tested-by: Philip Langdale <philipl@overt.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15181>
This commit is contained in:
Nanley Chery 2022-02-25 09:50:13 -08:00 committed by Marge Bot
parent 8d2b7e558b
commit cada519482
1 changed files with 5 additions and 4 deletions

View File

@ -1441,10 +1441,11 @@ anv_image_init_from_create_info(struct anv_device *device,
return anv_image_init_from_gralloc(device, image, pCreateInfo,
gralloc_info);
return anv_image_init(device, image,
&(struct anv_image_create_info) {
.vk_info = pCreateInfo,
});
struct anv_image_create_info create_info = {
.vk_info = pCreateInfo,
};
return anv_image_init(device, image, &create_info);
}
VkResult anv_CreateImage(