mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 23:30:10 +01:00
zink: check image format props before creating image
ensure that these attrs are viable before failing silently later on Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9788>
This commit is contained in:
parent
7edc3f50c1
commit
aac88f49e5
1 changed files with 7 additions and 0 deletions
|
|
@ -374,6 +374,13 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
if (optimal_tiling)
|
||||
*optimal_tiling = ici.tiling != VK_IMAGE_TILING_LINEAR;
|
||||
|
||||
VkImageFormatProperties image_props;
|
||||
if (vkGetPhysicalDeviceImageFormatProperties(screen->pdev, ici.format, ici.imageType,
|
||||
ici.tiling, ici.usage, ici.flags, &image_props) != VK_SUCCESS) {
|
||||
FREE(obj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct wsi_image_create_info image_wsi_info = {
|
||||
VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA,
|
||||
NULL,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue