150 lines
5.5 KiB
Plaintext
150 lines
5.5 KiB
Plaintext
// Copyright (c) 2014-2016 Khronos Group. This work is licensed under a
|
|
// Creative Commons Attribution 4.0 International License; see
|
|
// http://creativecommons.org/licenses/by/4.0/
|
|
|
|
VkFormatProperties(3)
|
|
=====================
|
|
|
|
Name
|
|
----
|
|
VkFormatProperties - Structure specifying image format properties
|
|
|
|
C Specification
|
|
---------------
|
|
|
|
// refBegin VkFormatProperties - Structure specifying image format properties
|
|
|
|
The sname:VkPhysicalDeviceLimits structure is defined as:
|
|
|
|
include::../structs/VkFormatProperties.txt[]
|
|
|
|
|
|
Members
|
|
-------
|
|
|
|
* pname:linearTilingFeatures describes the features supported by
|
|
ename:VK_IMAGE_TILING_LINEAR.
|
|
* pname:optimalTilingFeatures describes the features supported by
|
|
ename:VK_IMAGE_TILING_OPTIMAL.
|
|
* pname:bufferFeatures describes the features supported by buffers.
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
Supported features are described as a set of elink:VkFormatFeatureFlagBits:
|
|
|
|
// refBegin VkFormatFeatureFlagBits - Bitmask specifying features supported by a buffer
|
|
include::../enums/VkFormatFeatureFlagBits.txt[]
|
|
|
|
The pname:linearTilingFeatures and pname:optimalTilingFeatures members of
|
|
the sname:VkFormatProperties structure describe what features are supported
|
|
by ename:VK_IMAGE_TILING_LINEAR and ename:VK_IMAGE_TILING_OPTIMAL images,
|
|
respectively.
|
|
|
|
The following bits may: be set in pname:linearTilingFeatures and
|
|
pname:optimalTilingFeatures, indicating they are supported by images or
|
|
image views created with the queried
|
|
flink:vkGetPhysicalDeviceFormatProperties::pname:format:
|
|
|
|
ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT::
|
|
sname:VkImageView can: be sampled from. See
|
|
<<descriptorsets-sampledimage, sampled images>> section.
|
|
|
|
ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT::
|
|
sname:VkImageView can: be used as storage image. See
|
|
<<descriptorsets-storageimage, storage images>> section.
|
|
|
|
ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT::
|
|
sname:VkImageView can: be used as storage image that supports atomic
|
|
operations.
|
|
|
|
ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT::
|
|
sname:VkImageView can: be used as a framebuffer color attachment and
|
|
as an input attachment.
|
|
|
|
ename:VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT::
|
|
sname:VkImageView can: be used as a framebuffer color attachment that
|
|
supports blending and as an input attachment.
|
|
|
|
ename:VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT::
|
|
sname:VkImageView can: be used as a framebuffer depth/stencil attachment
|
|
and as an input attachment.
|
|
|
|
ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT::
|
|
sname:VkImage can: be used as pname:srcImage for the
|
|
fname:vkCmdBlitImage command.
|
|
|
|
ename:VK_FORMAT_FEATURE_BLIT_DST_BIT::
|
|
sname:VkImage can: be used as pname:dstImage for the
|
|
fname:vkCmdBlitImage command.
|
|
|
|
ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT::
|
|
If ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT is also set,
|
|
sname:VkImageView can: be used with a sampler that has either of
|
|
pname:magFilter or pname:minFilter set to ename:VK_FILTER_LINEAR,
|
|
or pname:mipmapMode set to ename:VK_SAMPLER_MIPMAP_MODE_LINEAR.
|
|
If ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT is also set, sname:VkImage
|
|
can be used as the pname:srcImage to flink:vkCmdBlitImage
|
|
with a pname:filter of ename:VK_FILTER_LINEAR. This bit must: only be
|
|
exposed for formats that also support the
|
|
ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT or
|
|
ename:VK_FORMAT_FEATURE_BLIT_SRC_BIT.
|
|
+
|
|
If the format being queried is a depth/stencil format, this bit only indicates
|
|
that the depth aspect (not the stencil aspect) of an image of this format
|
|
supports linear filtering,
|
|
and that linear filtering of the depth aspect is supported whether depth
|
|
compare is enabled in the sampler or not. If this bit is not present,
|
|
linear filtering with depth compare disabled is unsupported and linear
|
|
filtering with depth compare enabled is supported, but may: compute the
|
|
filtered value in an implementation-dependent manner which differs from
|
|
the normal rules of linear filtering. The resulting value must: be in the
|
|
range latexmath:[$[0,1\]$] and should: be proportional to, or a weighted
|
|
average of, the number of comparison passes or failures.
|
|
|
|
The following features may: appear in pname:bufferFeatures, indicating they
|
|
are supported by buffers or buffer views created with the queried
|
|
flink:vkGetPhysicalDeviceFormatProperties::pname:format:
|
|
|
|
ename:VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT::
|
|
Format can: be used to create a sname:VkBufferView that can: be bound to
|
|
a ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER descriptor.
|
|
|
|
ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT::
|
|
Format can: be used to create a sname:VkBufferView that can: be bound to
|
|
a ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor.
|
|
|
|
ename:VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT::
|
|
Atomic operations are supported on
|
|
ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER with this format.
|
|
|
|
ename:VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT::
|
|
Format can: be used as a vertex attribute format
|
|
(sname:VkVertexInputAttributeDescription.format).
|
|
|
|
If pname:format is a block-compression format, then buffers mustnot: support
|
|
any features for the format.
|
|
|
|
include::../validity/structs/VkFormatProperties.txt[]
|
|
|
|
|
|
See Also
|
|
--------
|
|
|
|
elink:VkFormatFeatureFlags, flink:vkGetPhysicalDeviceFormatProperties
|
|
|
|
|
|
Document Notes
|
|
--------------
|
|
|
|
For more information, see the Vulkan Specification at URL
|
|
|
|
https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#VkFormatProperties
|
|
|
|
This page is extracted from the Vulkan Specification.
|
|
Fixes and changes should be made to the Specification,not directly.
|
|
|
|
include::footer.txt[]
|
|
|