vkGetPhysicalDeviceImageFormatProperties
To query additional capabilities specific to image types, call:
VkResult vkGetPhysicalDeviceImageFormatProperties(
VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,
VkImageTiling tiling,
VkImageUsageFlags usage,
VkImageCreateFlags flags,
VkImageFormatProperties* pImageFormatProperties);
physicalDevice
is the physical device from which to query the image capabilities.format
is a VkFormat value specifying the image format, corresponding to VkImageCreateInfo::format
.type
is a VkImageType value specifying the image type, corresponding to VkImageCreateInfo::imageType
.tiling
is a VkImageTiling value specifying the image tiling, corresponding to VkImageCreateInfo::tiling
.usage
is a bitmask of VkImageUsageFlagBits specifying the intended usage of the image, corresponding to VkImageCreateInfo::usage
.flags
is a bitmask of VkImageCreateFlagBits specifying additional parameters of the image, corresponding to VkImageCreateInfo::flags
.pImageFormatProperties
is a pointer to a VkImageFormatProperties structure in which capabilities are returned.
The format
, type
, tiling
, usage
, and flags
parameters correspond to parameters that would be consumed by
vkCreateImage (as members of VkImageCreateInfo).
If format
is not a supported image format, or if the combination of
format
, type
, tiling
, usage
, and flags
is not
supported for images, then vkGetPhysicalDeviceImageFormatProperties
returns VK_ERROR_FORMAT_NOT_SUPPORTED
.
The limitations on an image format that are reported by
vkGetPhysicalDeviceImageFormatProperties
have the following property:
if usage1
and usage2
of type VkImageUsageFlags are such that
the bits set in usage1
are a subset of the bits set in usage2
, and
flags1
and flags2
of type VkImageCreateFlags are such that
the bits set in flags1
are a subset of the bits set in flags2
,
then the limitations for usage1
and flags1
must be no more strict
than the limitations for usage2
and flags2
, for all values of
format
, type
, and tiling
.
If VK_EXT_host_image_copy is supported, usage
includes
VK_IMAGE_USAGE_SAMPLED_BIT
, and flags
does not include either of
VK_IMAGE_CREATE_SPARSE_BINDING_BIT
,
VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
, or
VK_IMAGE_CREATE_SPARSE_ALIASED_BIT
, then the result of calls to
vkGetPhysicalDeviceImageFormatProperties
with identical parameters
except for the inclusion of VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT
in
usage
must be identical.
Valid Usage
VUID-vkGetPhysicalDeviceImageFormatProperties-tiling-02248
tiling
must not be VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
.
(Use vkGetPhysicalDeviceImageFormatProperties2 instead)
Valid Usage (Implicit)
VUID-vkGetPhysicalDeviceImageFormatProperties-physicalDevice-parameter
physicalDevice
must be a valid VkPhysicalDevice handle
VUID-vkGetPhysicalDeviceImageFormatProperties-format-parameter
format
must be a valid VkFormat value
VUID-vkGetPhysicalDeviceImageFormatProperties-type-parameter
type
must be a valid VkImageType value
VUID-vkGetPhysicalDeviceImageFormatProperties-tiling-parameter
tiling
must be a valid VkImageTiling value
VUID-vkGetPhysicalDeviceImageFormatProperties-usage-parameter
usage
must be a valid combination of VkImageUsageFlagBits values
VUID-vkGetPhysicalDeviceImageFormatProperties-usage-requiredbitmask
usage
must not be 0
VUID-vkGetPhysicalDeviceImageFormatProperties-flags-parameter
flags
must be a valid combination of VkImageCreateFlagBits values
VUID-vkGetPhysicalDeviceImageFormatProperties-pImageFormatProperties-parameter
pImageFormatProperties
must be a valid pointer to a VkImageFormatProperties structure