Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- trimCommandPool :: forall io. MonadIO io => Device -> CommandPool -> CommandPoolTrimFlags -> io ()
- newtype CommandPoolTrimFlags = CommandPoolTrimFlags Flags
- newtype Result where
- Result Int32
- pattern SUCCESS :: Result
- pattern NOT_READY :: Result
- pattern TIMEOUT :: Result
- pattern EVENT_SET :: Result
- pattern EVENT_RESET :: Result
- pattern INCOMPLETE :: Result
- pattern ERROR_OUT_OF_HOST_MEMORY :: Result
- pattern ERROR_OUT_OF_DEVICE_MEMORY :: Result
- pattern ERROR_INITIALIZATION_FAILED :: Result
- pattern ERROR_DEVICE_LOST :: Result
- pattern ERROR_MEMORY_MAP_FAILED :: Result
- pattern ERROR_LAYER_NOT_PRESENT :: Result
- pattern ERROR_EXTENSION_NOT_PRESENT :: Result
- pattern ERROR_FEATURE_NOT_PRESENT :: Result
- pattern ERROR_INCOMPATIBLE_DRIVER :: Result
- pattern ERROR_TOO_MANY_OBJECTS :: Result
- pattern ERROR_FORMAT_NOT_SUPPORTED :: Result
- pattern ERROR_FRAGMENTED_POOL :: Result
- pattern ERROR_UNKNOWN :: Result
- pattern ERROR_INCOMPATIBLE_SHADER_BINARY_EXT :: Result
- pattern ERROR_COMPRESSION_EXHAUSTED_EXT :: Result
- pattern OPERATION_NOT_DEFERRED_KHR :: Result
- pattern OPERATION_DEFERRED_KHR :: Result
- pattern THREAD_DONE_KHR :: Result
- pattern THREAD_IDLE_KHR :: Result
- pattern ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT :: Result
- pattern ERROR_NOT_PERMITTED_KHR :: Result
- pattern ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT :: Result
- pattern ERROR_INVALID_SHADER_NV :: Result
- pattern ERROR_VALIDATION_FAILED_EXT :: Result
- pattern ERROR_INCOMPATIBLE_DISPLAY_KHR :: Result
- pattern ERROR_OUT_OF_DATE_KHR :: Result
- pattern SUBOPTIMAL_KHR :: Result
- pattern ERROR_NATIVE_WINDOW_IN_USE_KHR :: Result
- pattern ERROR_SURFACE_LOST_KHR :: Result
- pattern ERROR_NO_PIPELINE_MATCH :: Result
- pattern ERROR_INVALID_PIPELINE_CACHE_DATA :: Result
- pattern ERROR_VALIDATION_FAILED :: Result
- pattern PIPELINE_COMPILE_REQUIRED :: Result
- pattern ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS :: Result
- pattern ERROR_FRAGMENTATION :: Result
- pattern ERROR_INVALID_EXTERNAL_HANDLE :: Result
- pattern ERROR_OUT_OF_POOL_MEMORY :: Result
- newtype ImageCreateFlagBits where
- ImageCreateFlagBits Flags
- pattern IMAGE_CREATE_SPARSE_BINDING_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_SPARSE_RESIDENCY_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_SPARSE_ALIASED_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_MUTABLE_FORMAT_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_CUBE_COMPATIBLE_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM :: ImageCreateFlagBits
- pattern IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_SUBSAMPLED_BIT_EXT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_CORNER_SAMPLED_BIT_NV :: ImageCreateFlagBits
- pattern IMAGE_CREATE_DISJOINT_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_PROTECTED_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_EXTENDED_USAGE_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT :: ImageCreateFlagBits
- pattern IMAGE_CREATE_ALIAS_BIT :: ImageCreateFlagBits
- type ImageCreateFlags = ImageCreateFlagBits
- newtype FormatFeatureFlagBits where
- FormatFeatureFlagBits Flags
- pattern FORMAT_FEATURE_SAMPLED_IMAGE_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_STORAGE_IMAGE_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_VERTEX_BUFFER_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_COLOR_ATTACHMENT_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_BLIT_SRC_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_BLIT_DST_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_DISJOINT_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_TRANSFER_DST_BIT :: FormatFeatureFlagBits
- pattern FORMAT_FEATURE_TRANSFER_SRC_BIT :: FormatFeatureFlagBits
- type FormatFeatureFlags = FormatFeatureFlagBits
Documentation
:: forall io. MonadIO io | |
=> Device |
|
-> CommandPool |
|
-> CommandPoolTrimFlags |
|
-> io () |
vkTrimCommandPool - Trim a command pool
Description
Trimming a command pool recycles unused memory from the command pool back to the system. Command buffers allocated from the pool are not affected by the command.
Note
This command provides applications with some control over the internal memory allocations used by command pools.
Unused memory normally arises from command buffers that have been
recorded and later reset, such that they are no longer using the memory.
On reset, a command buffer can return memory to its command pool, but
the only way to release memory from a command pool to the system
requires calling resetCommandPool
, which
cannot be executed while any command buffers from that pool are still in
use. Subsequent recording operations into command buffers will reuse
this memory but since total memory requirements fluctuate over time,
unused memory can accumulate.
In this situation, trimming a command pool may be useful to return unused memory back to the system, returning the total outstanding memory allocated by the pool back to a more “average” value.
Implementations utilize many internal allocation strategies that make it impossible to guarantee that all unused memory is released back to the system. For instance, an implementation of a command pool may involve allocating memory in bulk from the system and sub-allocating from that memory. In such an implementation any live command buffer that holds a reference to a bulk allocation would prevent that allocation from being freed, even if only a small proportion of the bulk allocation is in use.
In most cases trimming will result in a reduction in allocated but unused memory, but it does not guarantee the “ideal” behavior.
Trimming may be an expensive operation, and should not be called frequently. Trimming should be treated as a way to relieve memory pressure after application-known points when there exists enough unused memory that the cost of trimming is “worth” it.
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
commandPool
must be a validCommandPool
handle -
flags
must be0
-
commandPool
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
commandPool
must be externally synchronized
See Also
newtype CommandPoolTrimFlags Source #
VkCommandPoolTrimFlags - Reserved for future use
Description
CommandPoolTrimFlags
is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Instances
VkResult - Vulkan command return codes
Description
If a command returns a runtime error, unless otherwise specified any
output parameters will have undefined contents, except that if the
output parameter is a structure with sType
and pNext
fields, those
fields will be unmodified. Any structures chained from pNext
will also
have undefined contents, except that sType
and pNext
will be
unmodified.
VK_ERROR_OUT_OF_*_MEMORY
errors do not modify any currently existing
Vulkan objects. Objects that have already been successfully created
can still be used by the application.
Note
As a general rule, Free
, Release
, and Reset
commands do not return
ERROR_OUT_OF_HOST_MEMORY
, while any other command with a return code
may return it. Any exceptions from this rule are described for those
commands.
ERROR_UNKNOWN
will be returned by an implementation when an unexpected
error occurs that cannot be attributed to valid behavior of the
application and implementation. Under these conditions, it may be
returned from any command returning a Result
.
Note
ERROR_UNKNOWN
is not expected to ever be returned if the application
behavior is valid, and if the implementation is bug-free. If
ERROR_UNKNOWN
is received, the application should be checked against
the latest validation layers to verify correct behavior as much as
possible. If no issues are identified it could be an implementation
issue, and the implementor should be contacted for support.
Any command returning a Result
may return
ERROR_VALIDATION_FAILED_EXT
if a violation of valid usage is detected,
even though commands do not explicitly list this as a possible return
code.
Performance-critical commands generally do not have return codes. If a
runtime error occurs in such commands, the implementation will defer
reporting the error until a specified point. For commands that record
into command buffers (vkCmd*
) runtime errors are reported by
endCommandBuffer
.
See Also
pattern SUCCESS :: Result |
|
pattern NOT_READY :: Result |
|
pattern TIMEOUT :: Result |
|
pattern EVENT_SET :: Result |
|
pattern EVENT_RESET :: Result |
|
pattern INCOMPLETE :: Result |
|
pattern ERROR_OUT_OF_HOST_MEMORY :: Result |
|
pattern ERROR_OUT_OF_DEVICE_MEMORY :: Result |
|
pattern ERROR_INITIALIZATION_FAILED :: Result |
|
pattern ERROR_DEVICE_LOST :: Result |
|
pattern ERROR_MEMORY_MAP_FAILED :: Result |
|
pattern ERROR_LAYER_NOT_PRESENT :: Result |
|
pattern ERROR_EXTENSION_NOT_PRESENT :: Result |
|
pattern ERROR_FEATURE_NOT_PRESENT :: Result |
|
pattern ERROR_INCOMPATIBLE_DRIVER :: Result |
|
pattern ERROR_TOO_MANY_OBJECTS :: Result |
|
pattern ERROR_FORMAT_NOT_SUPPORTED :: Result |
|
pattern ERROR_FRAGMENTED_POOL :: Result |
|
pattern ERROR_UNKNOWN :: Result |
|
pattern ERROR_INCOMPATIBLE_SHADER_BINARY_EXT :: Result |
|
pattern ERROR_COMPRESSION_EXHAUSTED_EXT :: Result |
|
pattern OPERATION_NOT_DEFERRED_KHR :: Result |
|
pattern OPERATION_DEFERRED_KHR :: Result |
|
pattern THREAD_DONE_KHR :: Result |
|
pattern THREAD_IDLE_KHR :: Result |
|
pattern ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT :: Result |
|
pattern ERROR_NOT_PERMITTED_KHR :: Result | |
pattern ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT :: Result | |
pattern ERROR_INVALID_SHADER_NV :: Result |
|
pattern ERROR_VALIDATION_FAILED_EXT :: Result |
|
pattern ERROR_INCOMPATIBLE_DISPLAY_KHR :: Result |
|
pattern ERROR_OUT_OF_DATE_KHR :: Result |
|
pattern SUBOPTIMAL_KHR :: Result |
|
pattern ERROR_NATIVE_WINDOW_IN_USE_KHR :: Result |
|
pattern ERROR_SURFACE_LOST_KHR :: Result |
|
pattern ERROR_NO_PIPELINE_MATCH :: Result | |
pattern ERROR_INVALID_PIPELINE_CACHE_DATA :: Result | |
pattern ERROR_VALIDATION_FAILED :: Result | |
pattern PIPELINE_COMPILE_REQUIRED :: Result |
|
pattern ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS :: Result |
|
pattern ERROR_FRAGMENTATION :: Result |
|
pattern ERROR_INVALID_EXTERNAL_HANDLE :: Result |
|
pattern ERROR_OUT_OF_POOL_MEMORY :: Result |
|
Instances
Storable Result Source # | |
Read Result Source # | |
Show Result Source # | |
Eq Result Source # | |
Ord Result Source # | |
Zero Result Source # | |
Defined in Vulkan.Core10.Enums.Result |
newtype ImageCreateFlagBits Source #
VkImageCreateFlagBits - Bitmask specifying additional parameters of an image
Description
See Sparse Resource Features and Sparse Physical Device Features for more details.
See Also
pattern IMAGE_CREATE_SPARSE_BINDING_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_SPARSE_RESIDENCY_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_SPARSE_ALIASED_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_MUTABLE_FORMAT_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_CUBE_COMPATIBLE_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_SUBSAMPLED_BIT_EXT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_CORNER_SAMPLED_BIT_NV :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_DISJOINT_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_PROTECTED_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_EXTENDED_USAGE_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT :: ImageCreateFlagBits |
|
pattern IMAGE_CREATE_ALIAS_BIT :: ImageCreateFlagBits |
|
Instances
newtype FormatFeatureFlagBits Source #
VkFormatFeatureFlagBits - Bitmask specifying features supported by a buffer
Description
These values all have the same meaning as the equivalently named values
for FormatFeatureFlags2
and
may be set in linearTilingFeatures
, optimalTilingFeatures
, and
DrmFormatModifierPropertiesEXT
::drmFormatModifierTilingFeatures
,
specifying that the features are supported by images or
image views or
sampler Y′CBCR conversion objects
created with the queried
getPhysicalDeviceFormatProperties
::format
:
FORMAT_FEATURE_SAMPLED_IMAGE_BIT
specifies that an image view can be sampled from.FORMAT_FEATURE_STORAGE_IMAGE_BIT
specifies that an image view can be used as a storage image.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
specifies that an image view can be used as storage image that supports atomic operations.FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
specifies that an image view can be used as a framebuffer color attachment and as an input attachment.FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT
specifies that an image view can be used as a framebuffer color attachment that supports blending.FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
specifies that an image view can be used as a framebuffer depth/stencil attachment and as an input attachment.FORMAT_FEATURE_BLIT_SRC_BIT
specifies that an image can be used assrcImage
for thecmdBlitImage2
andcmdBlitImage
commands.FORMAT_FEATURE_BLIT_DST_BIT
specifies that an image can be used asdstImage
for thecmdBlitImage2
andcmdBlitImage
commands.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
specifies that ifFORMAT_FEATURE_SAMPLED_IMAGE_BIT
is also set, an image view can be used with a sampler that has either ofmagFilter
orminFilter
set toFILTER_LINEAR
, ormipmapMode
set toSAMPLER_MIPMAP_MODE_LINEAR
. IfFORMAT_FEATURE_BLIT_SRC_BIT
is also set, an image can be used as thesrcImage
tocmdBlitImage2
andcmdBlitImage
with afilter
ofFILTER_LINEAR
. This bit must only be exposed for formats that also support theFORMAT_FEATURE_SAMPLED_IMAGE_BIT
orFORMAT_FEATURE_BLIT_SRC_BIT
.If the format being queried is a depth/stencil format, this bit only specifies 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. Where depth comparison is supported it may be linear filtered whether this bit is present or not, but where this bit is not present the filtered value may be computed in an implementation-dependent manner which differs from the normal rules of linear filtering. The resulting value must be in the range [0,1] and should be proportional to, or a weighted average of, the number of comparison passes or failures.
FORMAT_FEATURE_TRANSFER_SRC_BIT
specifies that an image can be used as a source image for copy commands. If the applicationapiVersion
is Vulkan 1.0 andVK_KHR_maintenance1
is not supported,FORMAT_FEATURE_TRANSFER_SRC_BIT
is implied to be set when the format feature flag is not 0.FORMAT_FEATURE_TRANSFER_DST_BIT
specifies that an image can be used as a destination image for copy commands and clear commands. If the applicationapiVersion
is Vulkan 1.0 andVK_KHR_maintenance1
is not supported,FORMAT_FEATURE_TRANSFER_DST_BIT
is implied to be set when the format feature flag is not 0.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT
specifiesImage
can be used as a sampled image with a min or maxSamplerReductionMode
. This bit must only be exposed for formats that also support theFORMAT_FEATURE_SAMPLED_IMAGE_BIT
.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
specifies thatImage
can be used with a sampler that has either ofmagFilter
orminFilter
set toFILTER_CUBIC_EXT
, or be the source image for a blit withfilter
set toFILTER_CUBIC_EXT
. This bit must only be exposed for formats that also support theFORMAT_FEATURE_SAMPLED_IMAGE_BIT
. If the format being queried is a depth/stencil format, this only specifies that the depth aspect is cubic filterable.FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
specifies that an application can define a sampler Y′CBCR conversion using this format as a source, and that an image of this format can be used with aSamplerYcbcrConversionCreateInfo
xChromaOffset
and/oryChromaOffset
ofCHROMA_LOCATION_MIDPOINT
. Otherwise bothxChromaOffset
andyChromaOffset
must beCHROMA_LOCATION_COSITED_EVEN
. If a format does not incorporate chroma downsampling (it is not a “422” or “420” format) but the implementation supports sampler Y′CBCR conversion for this format, the implementation must setFORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
.FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT
specifies that an application can define a sampler Y′CBCR conversion using this format as a source, and that an image of this format can be used with aSamplerYcbcrConversionCreateInfo
xChromaOffset
and/oryChromaOffset
ofCHROMA_LOCATION_COSITED_EVEN
. Otherwise bothxChromaOffset
andyChromaOffset
must beCHROMA_LOCATION_MIDPOINT
. If neitherFORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT
norFORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
is set, the application must not define a sampler Y′CBCR conversion using this format as a source.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT
specifies that an application can define a sampler Y′CBCR conversion using this format as a source withchromaFilter
set toFILTER_LINEAR
.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT
specifies that the format can have different chroma, min, and mag filters.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT
specifies that reconstruction is explicit, as described in https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#textures-chroma-reconstruction. If this bit is not present, reconstruction is implicit by default.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT
specifies that reconstruction can be forcibly made explicit by settingSamplerYcbcrConversionCreateInfo
::forceExplicitReconstruction
toTRUE
. If the format being queried supportsFORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT
it must also supportFORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT
.FORMAT_FEATURE_DISJOINT_BIT
specifies that a multi-planar image can have theIMAGE_CREATE_DISJOINT_BIT
set during image creation. An implementation must not setFORMAT_FEATURE_DISJOINT_BIT
for single-plane formats.FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT
specifies that an image view can be used as a fragment density map attachment.FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR
specifies that an image view can be used as a fragment shading rate attachment. An implementation must not set this feature for formats with a numeric format other thanUINT
, or set it as a buffer feature.VK_FORMAT_FEATURE_VIDEO_DECODE_OUTPUT_BIT_KHR
specifies that an image view with this format can be used as a decode output picture in video decode operations.VK_FORMAT_FEATURE_VIDEO_DECODE_DPB_BIT_KHR
specifies that an image view with this format can be used as an output reconstructed picture or an input reference picture in video decode operations.VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR
specifies that an image view with this format can be used as an encode input picture in video encode operations.VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR
specifies that an image view with this format can be used as an output reconstructed picture or an input reference picture in video encode operations.Note
Specific video profiles may have additional restrictions on the format and other image creation parameters corresponding to image views used by video coding operations that can be enumerated using the vkGetPhysicalDeviceVideoFormatPropertiesKHR command.
The following bits may be set in bufferFeatures
, specifying that the
features are supported by buffers or
buffer views created with the queried
getPhysicalDeviceFormatProperties
::format
:
FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
specifies that the format can be used to create a buffer view that can be bound to aDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
descriptor.FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
specifies that the format can be used to create a buffer view that can be bound to aDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
descriptor.FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT
specifies that atomic operations are supported onDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
with this format.FORMAT_FEATURE_VERTEX_BUFFER_BIT
specifies that the format can be used as a vertex attribute format (VertexInputAttributeDescription
::format
).FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR
specifies that the format can be used as the vertex format when creating an acceleration structure (AccelerationStructureGeometryTrianglesDataKHR
::vertexFormat
). This format can also be used as the vertex format in host memory when doing host acceleration structure builds.
Note
FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
and
FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT
are only intended to be
advertised for single-component formats, since SPIR-V atomic operations
require a scalar type.
See Also
pattern FORMAT_FEATURE_SAMPLED_IMAGE_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_STORAGE_IMAGE_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_VERTEX_BUFFER_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_COLOR_ATTACHMENT_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_BLIT_SRC_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_BLIT_DST_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT :: FormatFeatureFlagBits |
If the format being queried is a depth/stencil format, this bit only specifies 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. Where depth comparison is supported it may be linear filtered whether this bit is present or not, but where this bit is not present the filtered value may be computed in an implementation-dependent manner which differs from the normal rules of linear filtering. The resulting value must be in the range [0,1] and should be proportional to, or a weighted average of, the number of comparison passes or failures. |
pattern FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_DISJOINT_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_TRANSFER_DST_BIT :: FormatFeatureFlagBits |
|
pattern FORMAT_FEATURE_TRANSFER_SRC_BIT :: FormatFeatureFlagBits |
|