mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2025-02-21 10:41:48 +00: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
@ -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…
x
Reference in New Issue
Block a user