vulkan-2.0.0.1: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.DeviceInitialization

Synopsis

Documentation

newtype VkImageTiling Source #

Constructors

VkImageTiling Int32 

pattern VK_IMAGE_TILING_OPTIMAL :: VkImageTiling Source #

VK_IMAGE_TILING_OPTIMAL specifies optimal tiling (texels are laid out in an implementation-dependent arrangement, for more optimal memory access).

pattern VK_IMAGE_TILING_LINEAR :: VkImageTiling Source #

VK_IMAGE_TILING_LINEAR specifies linear tiling (texels are laid out in memory in row-major order, possibly with some padding on each row).

newtype VkImageType Source #

Constructors

VkImageType Int32 

pattern VK_IMAGE_TYPE_1D :: VkImageType Source #

VK_IMAGE_TYPE_1D specifies a one-dimensional image.

pattern VK_IMAGE_TYPE_2D :: VkImageType Source #

VK_IMAGE_TYPE_2D specifies a two-dimensional image.

pattern VK_IMAGE_TYPE_3D :: VkImageType Source #

VK_IMAGE_TYPE_3D specifies a three-dimensional image.

newtype VkPhysicalDeviceType Source #

VkPhysicalDeviceType - Supported physical device types

Description

  • VK_PHYSICAL_DEVICE_TYPE_OTHER - the device does not match any other available types.
  • VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU - the device is typically one embedded in or tightly coupled with the host.
  • VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU - the device is typically a separate processor connected to the host via an interlink.
  • VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU - the device is typically a virtual node in a virtualization environment.
  • VK_PHYSICAL_DEVICE_TYPE_CPU - the device is typically running on the same processors as the host.

The physical device type is advertised for informational purposes only, and does not directly affect the operation of the system. However, the device type may correlate with other advertised properties or capabilities of the system, such as how many memory heaps there are.

See Also

VkPhysicalDeviceProperties

Instances
Eq VkPhysicalDeviceType Source # 
Instance details
Ord VkPhysicalDeviceType Source # 
Instance details
Read VkPhysicalDeviceType Source # 
Instance details
Show VkPhysicalDeviceType Source # 
Instance details
Storable VkPhysicalDeviceType Source # 
Instance details

newtype VkSystemAllocationScope Source #

VkSystemAllocationScope - Allocation scope

Description

  • VK_SYSTEM_ALLOCATION_SCOPE_COMMAND specifies that the allocation is scoped to the duration of the Vulkan command.
  • VK_SYSTEM_ALLOCATION_SCOPE_OBJECT specifies that the allocation is scoped to the lifetime of the Vulkan object that is being created or used.
  • VK_SYSTEM_ALLOCATION_SCOPE_CACHE specifies that the allocation is scoped to the lifetime of a VkPipelineCache or VkValidationCacheEXT object.
  • VK_SYSTEM_ALLOCATION_SCOPE_DEVICE specifies that the allocation is scoped to the lifetime of the Vulkan device.
  • VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE specifies that the allocation is scoped to the lifetime of the Vulkan instance.

Most Vulkan commands operate on a single object, or there is a sole object that is being created or manipulated. When an allocation uses an allocation scope of VK_SYSTEM_ALLOCATION_SCOPE_OBJECT or VK_SYSTEM_ALLOCATION_SCOPE_CACHE, the allocation is scoped to the object being created or manipulated.

When an implementation requires host memory, it will make callbacks to the application using the most specific allocator and allocation scope available:

  • If an allocation is scoped to the duration of a command, the allocator will use the VK_SYSTEM_ALLOCATION_SCOPE_COMMAND allocation scope. The most specific allocator available is used: if the object being created or manipulated has an allocator, that object’s allocator will be used, else if the parent VkDevice has an allocator it will be used, else if the parent VkInstance has an allocator it will be used. Else,
  • If an allocation is associated with an object of type VkValidationCacheEXT or VkPipelineCache, the allocator will use the VK_SYSTEM_ALLOCATION_SCOPE_CACHE allocation scope. The most specific allocator available is used (cache, else device, else instance). Else,
  • If an allocation is scoped to the lifetime of an object, that object is being created or manipulated by the command, and that object’s type is not VkDevice or VkInstance, the allocator will use an allocation scope of VK_SYSTEM_ALLOCATION_SCOPE_OBJECT. The most specific allocator available is used (object, else device, else instance). Else,
  • If an allocation is scoped to the lifetime of a device, the allocator will use an allocation scope of VK_SYSTEM_ALLOCATION_SCOPE_DEVICE. The most specific allocator available is used (device, else instance). Else,
  • If the allocation is scoped to the lifetime of an instance and the instance has an allocator, its allocator will be used with an allocation scope of VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE.
  • Otherwise an implementation will allocate memory through an alternative mechanism that is unspecified.

See Also

VkAllocationCallbacks

Instances
Eq VkSystemAllocationScope Source # 
Instance details
Ord VkSystemAllocationScope Source # 
Instance details
Read VkSystemAllocationScope Source # 
Instance details
Show VkSystemAllocationScope Source # 
Instance details
Storable VkSystemAllocationScope Source # 
Instance details

newtype VkInternalAllocationType Source #

VkInternalAllocationType - Allocation type

See Also

PFN_vkInternalAllocationNotification, PFN_vkInternalFreeNotification

Instances
Eq VkInternalAllocationType Source # 
Instance details
Ord VkInternalAllocationType Source # 
Instance details
Read VkInternalAllocationType Source # 
Instance details
Show VkInternalAllocationType Source # 
Instance details
Storable VkInternalAllocationType Source # 
Instance details

pattern VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE :: VkInternalAllocationType Source #

VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE specifies that the allocation is intended for execution by the host.

newtype VkInstanceCreateFlags Source #

VkInstanceCreateFlags - Reserved for future use

Description

VkInstanceCreateFlags is a bitmask type for setting a mask, but is currently reserved for future use.

See Also

VkInstanceCreateInfo

Instances
Eq VkInstanceCreateFlags Source # 
Instance details
Ord VkInstanceCreateFlags Source # 
Instance details
Read VkInstanceCreateFlags Source # 
Instance details
Show VkInstanceCreateFlags Source # 
Instance details
Storable VkInstanceCreateFlags Source # 
Instance details
Bits VkInstanceCreateFlags Source # 
Instance details
FiniteBits VkInstanceCreateFlags Source # 
Instance details

newtype VkQueueFlagBits Source #

VkQueueFlagBits - Bitmask specifying capabilities of queues in a queue family

Description

  • VK_QUEUE_GRAPHICS_BIT specifies that queues in this queue family support graphics operations.
  • VK_QUEUE_COMPUTE_BIT specifies that queues in this queue family support compute operations.
  • VK_QUEUE_TRANSFER_BIT specifies that queues in this queue family support transfer operations.
  • VK_QUEUE_SPARSE_BINDING_BIT specifies that queues in this queue family support sparse memory management operations (see Sparse Resources). If any of the sparse resource features are enabled, then at least one queue family must support this bit.

If an implementation exposes any queue family that supports graphics operations, at least one queue family of at least one physical device exposed by the implementation must support both graphics and compute operations.

Note

All commands that are allowed on a queue that supports transfer operations are also allowed on a queue that supports either graphics or compute operations. Thus, if the capabilities of a queue family include VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, then reporting the VK_QUEUE_TRANSFER_BIT capability separately for that queue family is optional.

For further details see Queues.

See Also

VkQueueFlags

Constructors

VkQueueFlagBits VkFlags 
Instances
Eq VkQueueFlagBits Source # 
Instance details
Ord VkQueueFlagBits Source # 
Instance details
Read VkQueueFlagBits Source # 
Instance details
Show VkQueueFlagBits Source # 
Instance details
Storable VkQueueFlagBits Source # 
Instance details
Bits VkQueueFlagBits Source # 
Instance details
FiniteBits VkQueueFlagBits Source # 
Instance details

newtype VkMemoryPropertyFlagBits Source #

VkMemoryPropertyFlagBits - Bitmask specifying properties for a memory type

See Also

VkMemoryPropertyFlags

Instances
Eq VkMemoryPropertyFlagBits Source # 
Instance details
Ord VkMemoryPropertyFlagBits Source # 
Instance details
Read VkMemoryPropertyFlagBits Source # 
Instance details
Show VkMemoryPropertyFlagBits Source # 
Instance details
Storable VkMemoryPropertyFlagBits Source # 
Instance details
Bits VkMemoryPropertyFlagBits Source # 
Instance details
FiniteBits VkMemoryPropertyFlagBits Source # 
Instance details

pattern VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT :: VkMemoryPropertyFlagBits Source #

VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit specifies that memory allocated with this type is the most efficient for device access. This property will be set if and only if the memory type belongs to a heap with the VK_MEMORY_HEAP_DEVICE_LOCAL_BIT set.

pattern VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT :: VkMemoryPropertyFlagBits Source #

VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit specifies that memory allocated with this type can be mapped for host access using vkMapMemory.

pattern VK_MEMORY_PROPERTY_HOST_COHERENT_BIT :: VkMemoryPropertyFlagBits Source #

VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bit specifies that the host cache management commands vkFlushMappedMemoryRanges and vkInvalidateMappedMemoryRanges are not needed to flush host writes to the device or make device writes visible to the host, respectively.

pattern VK_MEMORY_PROPERTY_HOST_CACHED_BIT :: VkMemoryPropertyFlagBits Source #

VK_MEMORY_PROPERTY_HOST_CACHED_BIT bit specifies that memory allocated with this type is cached on the host. Host memory accesses to uncached memory are slower than to cached memory, however uncached memory is always host coherent.

pattern VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT :: VkMemoryPropertyFlagBits Source #

VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit specifies that the memory type only allows device access to the memory. Memory types must not have both VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT and VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set. Additionally, the object’s backing memory may be provided by the implementation lazily as specified in Lazily Allocated Memory.

newtype VkMemoryHeapFlagBits Source #

VkMemoryHeapFlagBits - Bitmask specifying attribute flags for a heap

See Also

VkMemoryHeapFlags

Instances
Eq VkMemoryHeapFlagBits Source # 
Instance details
Ord VkMemoryHeapFlagBits Source # 
Instance details
Read VkMemoryHeapFlagBits Source # 
Instance details
Show VkMemoryHeapFlagBits Source # 
Instance details
Storable VkMemoryHeapFlagBits Source # 
Instance details
Bits VkMemoryHeapFlagBits Source # 
Instance details
FiniteBits VkMemoryHeapFlagBits Source # 
Instance details

pattern VK_MEMORY_HEAP_DEVICE_LOCAL_BIT :: VkMemoryHeapFlagBits Source #

VK_MEMORY_HEAP_DEVICE_LOCAL_BIT specifies that the heap corresponds to device local memory. Device local memory may have different performance characteristics than host local memory, and may support different memory property flags.

newtype VkImageUsageFlagBits Source #

VkImageUsageFlagBits - Bitmask specifying intended usage of an image

See Also

VkImageUsageFlags

Instances
Eq VkImageUsageFlagBits Source # 
Instance details
Ord VkImageUsageFlagBits Source # 
Instance details
Read VkImageUsageFlagBits Source # 
Instance details
Show VkImageUsageFlagBits Source # 
Instance details
Storable VkImageUsageFlagBits Source # 
Instance details
Bits VkImageUsageFlagBits Source # 
Instance details
FiniteBits VkImageUsageFlagBits Source # 
Instance details

pattern VK_IMAGE_USAGE_TRANSFER_SRC_BIT :: VkImageUsageFlagBits Source #

VK_IMAGE_USAGE_TRANSFER_SRC_BIT specifies that the image can be used as the source of a transfer command.

pattern VK_IMAGE_USAGE_TRANSFER_DST_BIT :: VkImageUsageFlagBits Source #

VK_IMAGE_USAGE_TRANSFER_DST_BIT specifies that the image can be used as the destination of a transfer command.

pattern VK_IMAGE_USAGE_SAMPLED_BIT :: VkImageUsageFlagBits Source #

VK_IMAGE_USAGE_SAMPLED_BIT specifies that the image can be used to create a VkImageView suitable for occupying a VkDescriptorSet slot either of type VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and be sampled by a shader.

pattern VK_IMAGE_USAGE_STORAGE_BIT :: VkImageUsageFlagBits Source #

VK_IMAGE_USAGE_STORAGE_BIT specifies that the image can be used to create a VkImageView suitable for occupying a VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_STORAGE_IMAGE.

pattern VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT :: VkImageUsageFlagBits Source #

VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT specifies that the image can be used to create a VkImageView suitable for use as a color or resolve attachment in a VkFramebuffer.

pattern VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT :: VkImageUsageFlagBits Source #

VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT specifies that the image can be used to create a VkImageView suitable for use as a depth/stencil attachment in a VkFramebuffer.

pattern VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT :: VkImageUsageFlagBits Source #

VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT specifies that the memory bound to this image will have been allocated with the VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT (see {html_spec_relative}#memory for more detail). This bit can be set for any image that can be used to create a VkImageView suitable for use as a color, resolve, depth/stencil, or input attachment.

pattern VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT :: VkImageUsageFlagBits Source #

VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT specifies that the image can be used to create a VkImageView suitable for occupying VkDescriptorSet slot of type VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; be read from a shader as an input attachment; and be used as an input attachment in a framebuffer.

newtype VkImageCreateFlagBits Source #

VkImageCreateFlagBits - Bitmask specifying additional parameters of an image

Description

  • VK_IMAGE_CREATE_SPARSE_BINDING_BIT specifies that the image will be backed using sparse memory binding.
  • VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with the VK_IMAGE_CREATE_SPARSE_BINDING_BIT flag.
  • VK_IMAGE_CREATE_SPARSE_ALIASED_BIT specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with the VK_IMAGE_CREATE_SPARSE_BINDING_BIT flag
  • VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT specifies that the image can be used to create a VkImageView with a different format from the image. For multi-planar formats, VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT specifies that a VkImageView can be created of a plane of the image.
  • VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT specifies that the image can be used to create a VkImageView of type VK_IMAGE_VIEW_TYPE_CUBE or VK_IMAGE_VIEW_TYPE_CUBE_ARRAY.
  • VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT specifies that the image can be used to create a VkImageView of type VK_IMAGE_VIEW_TYPE_2D or VK_IMAGE_VIEW_TYPE_2D_ARRAY.
  • VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT specifies that the image can be used with a non-zero value of the splitInstanceBindRegionCount member of a VkBindImageMemoryDeviceGroupInfo structure passed into vkBindImageMemory2. This flag also has the effect of making the image use the standard sparse image block dimensions.
  • VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT specifies that the image having a compressed format can be used to create a VkImageView with an uncompressed format where each texel in the image view corresponds to a compressed texel block of the image.
  • VK_IMAGE_CREATE_EXTENDED_USAGE_BIT specifies that the image can be created with usage flags that are not supported for the format the image is created with but are supported for at least one format a VkImageView created from the image can have.
  • VK_IMAGE_CREATE_DISJOINT_BIT specifies that an image with a multi-planar format must have each plane separately bound to memory, rather than having a single memory binding for the whole image; the presence of this bit distinguishes a disjoint image from an image without this bit set.
  • VK_IMAGE_CREATE_ALIAS_BIT specifies that two images created with the same creation parameters and aliased to the same memory can interpret the contents of the memory consistently with each other, subject to the rules described in the Memory Aliasing section. This flag further specifies that each plane of a disjoint image can share an in-memory non-linear representation with single-plane images, and that a single-plane image can share an in-memory non-linear representation with a plane of a multi-planar disjoint image, according to the rules in {html_spec_relative}#features-formats-compatible-planes. If the pNext chain includes a VkExternalMemoryImageCreateInfo or VkExternalMemoryImageCreateInfoNV structure whose handleTypes member is not 0, it is as if VK_IMAGE_CREATE_ALIAS_BIT is set.
  • VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT specifies that an image with a depth or depth/stencil format can be used with custom sample locations when used as a depth/stencil attachment.

See Sparse Resource Features and Sparse Physical Device Features for more details.

See Also

VkImageCreateFlags

Instances
Eq VkImageCreateFlagBits Source # 
Instance details
Ord VkImageCreateFlagBits Source # 
Instance details
Read VkImageCreateFlagBits Source # 
Instance details
Show VkImageCreateFlagBits Source # 
Instance details
Storable VkImageCreateFlagBits Source # 
Instance details
Bits VkImageCreateFlagBits Source # 
Instance details
FiniteBits VkImageCreateFlagBits Source # 
Instance details

newtype VkFormatFeatureFlagBits Source #

VkFormatFeatureFlagBits - Bitmask specifying features supported by a buffer

Description

The following bits may be set in linearTilingFeatures and optimalTilingFeatures, specifying that the features are supported by images or image views created with the queried vkGetPhysicalDeviceFormatProperties::format:

  • VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT specifies that an image view can be sampled from.
  • VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT specifies that an image view can be used as a storage images.
  • VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT specifies that an image view can be used as storage image that supports atomic operations.
  • VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT specifies that an image view can be used as a framebuffer color attachment and as an input attachment.
  • VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT specifies that an image view can be used as a framebuffer color attachment that supports blending and as an input attachment.
  • VK_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.
  • VK_FORMAT_FEATURE_BLIT_SRC_BIT specifies that an image can be used as srcImage for the vkCmdBlitImage command.
  • VK_FORMAT_FEATURE_BLIT_DST_BIT specifies that an image can be used as dstImage for the vkCmdBlitImage command.
  • VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT specifies that if VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT is also set, an image view can be used with a sampler that has either of magFilter or minFilter set to VK_FILTER_LINEAR, or mipmapMode set to VK_SAMPLER_MIPMAP_MODE_LINEAR. If VK_FORMAT_FEATURE_BLIT_SRC_BIT is also set, an image can be used as the srcImage to vkCmdBlitImage with a filter of VK_FILTER_LINEAR. This bit must only be exposed for formats that also support the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT or VK_FORMAT_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. 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 [0,1] and should be proportional to, or a weighted average of, the number of comparison passes or failures.

  • VK_FORMAT_FEATURE_TRANSFER_SRC_BIT specifies that an image can be used as a source image for copy commands.
  • VK_FORMAT_FEATURE_TRANSFER_DST_BIT specifies that an image can be used as a destination image for copy commands and clear commands.
  • VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT specifies VkImage can be used as a sampled image with a min or max VkSamplerReductionModeEXT. This bit must only be exposed for formats that also support the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT.
  • VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG specifies that VkImage can be used with a sampler that has either of magFilter or minFilter set to VK_FILTER_CUBIC_IMG, or be the source image for a blit with filter set to VK_FILTER_CUBIC_IMG. This bit must only be exposed for formats that also support the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT. If the format being queried is a depth/stencil format, this only specifies that the depth aspect is cubic filterable.
  • VK_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 a VkSamplerYcbcrConversionCreateInfo xChromaOffset and/or yChromaOffset of VK_CHROMA_LOCATION_MIDPOINT. Otherwise both xChromaOffset and yChromaOffset must be VK_CHROMA_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 set VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT.
  • VK_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 a VkSamplerYcbcrConversionCreateInfo xChromaOffset and/or yChromaOffset of VK_CHROMA_LOCATION_COSITED_EVEN. Otherwise both xChromaOffset and yChromaOffset must be VK_CHROMA_LOCATION_MIDPOINT. If neither VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT nor VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT is set, the application must not define a sampler Y’CBCR conversion using this format as a source.
  • VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT specifies that the format can do linear sampler filtering (min/magFilter) whilst sampler Y’CBCR conversion is enabled.
  • VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT specifies that the format can have different chroma, min, and mag filters.
  • VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT specifies that reconstruction is explicit, as described in {html_spec_relative}#textures-chroma-reconstruction. If this bit is not present, reconstruction is implicit by default.
  • VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT specifies that reconstruction can be forcibly made explicit by setting VkSamplerYcbcrConversionCreateInfo::forceExplicitReconstruction to VK_TRUE.
  • VK_FORMAT_FEATURE_DISJOINT_BIT specifies that a multi-planar image can have the VK_IMAGE_CREATE_DISJOINT_BIT set during image creation. An implementation must not set VK_FORMAT_FEATURE_DISJOINT_BIT for single-plane formats.

The following bits may be set in bufferFeatures, specifying that the features are supported by buffers or buffer views created with the queried vkGetPhysicalDeviceProperties::format:

  • VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT specifies that the format can be used to create a buffer view that can be bound to a VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER descriptor.
  • VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT specifies that the format can be used to create a buffer view that can be bound to a VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER descriptor.
  • VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT specifies that atomic operations are supported on VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER with this format.
  • VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT specifies that the format can be used as a vertex attribute format (VkVertexInputAttributeDescription::format).

See Also

VkFormatFeatureFlags

Instances
Eq VkFormatFeatureFlagBits Source # 
Instance details
Ord VkFormatFeatureFlagBits Source # 
Instance details
Read VkFormatFeatureFlagBits Source # 
Instance details
Show VkFormatFeatureFlagBits Source # 
Instance details
Storable VkFormatFeatureFlagBits Source # 
Instance details
Bits VkFormatFeatureFlagBits Source # 
Instance details
FiniteBits VkFormatFeatureFlagBits Source # 
Instance details

newtype VkSampleCountFlagBits Source #

Instances
Eq VkSampleCountFlagBits Source # 
Instance details
Ord VkSampleCountFlagBits Source # 
Instance details
Read VkSampleCountFlagBits Source # 
Instance details
Show VkSampleCountFlagBits Source # 
Instance details
Storable VkSampleCountFlagBits Source # 
Instance details
Bits VkSampleCountFlagBits Source # 
Instance details
FiniteBits VkSampleCountFlagBits Source # 
Instance details

pattern VK_SAMPLE_COUNT_1_BIT :: VkSampleCountFlagBits Source #

VK_SAMPLE_COUNT_1_BIT specifies an image with one sample per pixel.

pattern VK_SAMPLE_COUNT_2_BIT :: VkSampleCountFlagBits Source #

VK_SAMPLE_COUNT_2_BIT specifies an image with 2 samples per pixel.

pattern VK_SAMPLE_COUNT_4_BIT :: VkSampleCountFlagBits Source #

VK_SAMPLE_COUNT_4_BIT specifies an image with 4 samples per pixel.

pattern VK_SAMPLE_COUNT_8_BIT :: VkSampleCountFlagBits Source #

VK_SAMPLE_COUNT_8_BIT specifies an image with 8 samples per pixel.

pattern VK_SAMPLE_COUNT_16_BIT :: VkSampleCountFlagBits Source #

VK_SAMPLE_COUNT_16_BIT specifies an image with 16 samples per pixel.

pattern VK_SAMPLE_COUNT_32_BIT :: VkSampleCountFlagBits Source #

VK_SAMPLE_COUNT_32_BIT specifies an image with 32 samples per pixel.

pattern VK_SAMPLE_COUNT_64_BIT :: VkSampleCountFlagBits Source #

VK_SAMPLE_COUNT_64_BIT specifies an image with 64 samples per pixel.

pattern VK_UUID_SIZE :: Integral a => a Source #

type PFN_vkInternalAllocationNotification = Ptr (("pUserData" ::: Ptr ()) -> ("size" ::: CSize) -> ("allocationType" ::: VkInternalAllocationType) -> ("allocationScope" ::: VkSystemAllocationScope) -> IO ()) Source #

PFN_vkInternalAllocationNotification - Application-defined memory allocation notification function

Parameters

  • pUserData is the value specified for VkAllocationCallbacks::pUserData in the allocator specified by the application.
  • size is the requested size of an allocation.
  • allocationType is a VkInternalAllocationType value specifying the requested type of an allocation.
  • allocationScope is a VkSystemAllocationScope value specifying the allocation scope of the lifetime of the allocation, as described here.

Description

This is a purely informational callback.

See Also

VkAllocationCallbacks

type PFN_vkInternalFreeNotification = Ptr (("pUserData" ::: Ptr ()) -> ("size" ::: CSize) -> ("allocationType" ::: VkInternalAllocationType) -> ("allocationScope" ::: VkSystemAllocationScope) -> IO ()) Source #

PFN_vkInternalFreeNotification - Application-defined memory free notification function

Parameters

  • pUserData is the value specified for VkAllocationCallbacks::pUserData in the allocator specified by the application.
  • size is the requested size of an allocation.
  • allocationType is a VkInternalAllocationType value specifying the requested type of an allocation.
  • allocationScope is a VkSystemAllocationScope value specifying the allocation scope of the lifetime of the allocation, as described here.

See Also

VkAllocationCallbacks

type PFN_vkReallocationFunction = Ptr (("pUserData" ::: Ptr ()) -> ("pOriginal" ::: Ptr ()) -> ("size" ::: CSize) -> ("alignment" ::: CSize) -> ("allocationScope" ::: VkSystemAllocationScope) -> IO (Ptr ())) Source #

PFN_vkReallocationFunction - Application-defined memory reallocation function

Parameters

  • pUserData is the value specified for VkAllocationCallbacks::pUserData in the allocator specified by the application.
  • pOriginal must be either NULL or a pointer previously returned by pfnReallocation or pfnAllocation of the same allocator.
  • size is the size in bytes of the requested allocation.
  • alignment is the requested alignment of the allocation in bytes and must be a power of two.
  • allocationScope is a VkSystemAllocationScope value specifying the allocation scope of the lifetime of the allocation, as described here.

Description

pfnReallocation must return an allocation with enough space for size bytes, and the contents of the original allocation from bytes zero to min(original size, new size) - 1 must be preserved in the returned allocation. If size is larger than the old size, the contents of the additional space are undefined. If satisfying these requirements involves creating a new allocation, then the old allocation should be freed.

If pOriginal is NULL, then pfnReallocation must behave equivalently to a call to PFN_vkAllocationFunction with the same parameter values (without pOriginal).

If size is zero, then pfnReallocation must behave equivalently to a call to PFN_vkFreeFunction with the same pUserData parameter value, and pMemory equal to pOriginal.

If pOriginal is non-NULL, the implementation must ensure that alignment is equal to the alignment used to originally allocate pOriginal.

If this function fails and pOriginal is non-NULL the application must not free the old allocation.

pfnReallocation must follow the same rules for return values as @PFN_vkAllocationFunction@.

See Also

VkAllocationCallbacks

type PFN_vkAllocationFunction = Ptr (("pUserData" ::: Ptr ()) -> ("size" ::: CSize) -> ("alignment" ::: CSize) -> ("allocationScope" ::: VkSystemAllocationScope) -> IO (Ptr ())) Source #

PFN_vkAllocationFunction - Application-defined memory allocation function

Parameters

  • pUserData is the value specified for VkAllocationCallbacks::pUserData in the allocator specified by the application.
  • size is the size in bytes of the requested allocation.
  • alignment is the requested alignment of the allocation in bytes and must be a power of two.
  • allocationScope is a VkSystemAllocationScope value specifying the allocation scope of the lifetime of the allocation, as described here.

Description

If pfnAllocation is unable to allocate the requested memory, it must return NULL. If the allocation was successful, it must return a valid pointer to memory allocation containing at least size bytes, and with the pointer value being a multiple of alignment.

Note

Correct Vulkan operation cannot be assumed if the application does not follow these rules.

For example, pfnAllocation (or pfnReallocation) could cause termination of running Vulkan instance(s) on a failed allocation for debugging purposes, either directly or indirectly. In these circumstances, it cannot be assumed that any part of any affected VkInstance objects are going to operate correctly (even vkDestroyInstance), and the application must ensure it cleans up properly via other means (e.g. process termination).

If pfnAllocation returns NULL, and if the implementation is unable to continue correct processing of the current command without the requested allocation, it must treat this as a run-time error, and generate VK_ERROR_OUT_OF_HOST_MEMORY at the appropriate time for the command in which the condition was detected, as described in Return Codes.

If the implementation is able to continue correct processing of the current command without the requested allocation, then it may do so, and must not generate VK_ERROR_OUT_OF_HOST_MEMORY as a result of this failed allocation.

See Also

VkAllocationCallbacks

type PFN_vkFreeFunction = Ptr (("pUserData" ::: Ptr ()) -> ("pMemory" ::: Ptr ()) -> IO ()) Source #

PFN_vkFreeFunction - Application-defined memory free function

Parameters

  • pUserData is the value specified for VkAllocationCallbacks::pUserData in the allocator specified by the application.
  • pMemory is the allocation to be freed.

Description

pMemory may be NULL, which the callback must handle safely. If pMemory is non-NULL, it must be a pointer previously allocated by pfnAllocation or pfnReallocation. The application should free this memory.

See Also

VkAllocationCallbacks

type PFN_vkVoidFunction = Ptr (() -> IO ()) Source #

PFN_vkVoidFunction - Dummy function pointer type returned by queries

See Also

vkGetDeviceProcAddr, vkGetInstanceProcAddr

type VkPhysicalDevice = Ptr VkPhysicalDevice_T Source #

VkPhysicalDevice - Opaque handle to a physical device object

See Also

VkDeviceGroupDeviceCreateInfo, VkPhysicalDeviceGroupProperties, vkAcquireXlibDisplayEXT, vkCreateDevice, vkCreateDisplayModeKHR, vkEnumerateDeviceExtensionProperties, vkEnumerateDeviceLayerProperties, vkEnumeratePhysicalDevices, vkGetDisplayModePropertiesKHR, vkGetDisplayPlaneCapabilitiesKHR, vkGetDisplayPlaneSupportedDisplaysKHR, vkGetPhysicalDeviceDisplayPlanePropertiesKHR, vkGetPhysicalDeviceDisplayPropertiesKHR, vkGetPhysicalDeviceExternalBufferProperties, vkGetPhysicalDeviceExternalBufferPropertiesKHR, vkGetPhysicalDeviceExternalFenceProperties, vkGetPhysicalDeviceExternalFencePropertiesKHR, vkGetPhysicalDeviceExternalImageFormatPropertiesNV, vkGetPhysicalDeviceExternalSemaphoreProperties, vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, vkGetPhysicalDeviceFeatures, vkGetPhysicalDeviceFeatures2, vkGetPhysicalDeviceFeatures2KHR, vkGetPhysicalDeviceFormatProperties, vkGetPhysicalDeviceFormatProperties2, vkGetPhysicalDeviceFormatProperties2KHR, vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX, vkGetPhysicalDeviceImageFormatProperties, vkGetPhysicalDeviceImageFormatProperties2, vkGetPhysicalDeviceImageFormatProperties2KHR, vkGetPhysicalDeviceMemoryProperties, vkGetPhysicalDeviceMemoryProperties2, vkGetPhysicalDeviceMemoryProperties2KHR, vkGetPhysicalDeviceMirPresentationSupportKHR, vkGetPhysicalDeviceMultisamplePropertiesEXT, vkGetPhysicalDevicePresentRectanglesKHR, vkGetPhysicalDeviceProperties, vkGetPhysicalDeviceProperties2, vkGetPhysicalDeviceProperties2KHR, vkGetPhysicalDeviceQueueFamilyProperties, vkGetPhysicalDeviceQueueFamilyProperties2, vkGetPhysicalDeviceQueueFamilyProperties2KHR, vkGetPhysicalDeviceSparseImageFormatProperties, vkGetPhysicalDeviceSparseImageFormatProperties2, vkGetPhysicalDeviceSparseImageFormatProperties2KHR, vkGetPhysicalDeviceSurfaceCapabilities2EXT, vkGetPhysicalDeviceSurfaceCapabilities2KHR, vkGetPhysicalDeviceSurfaceCapabilitiesKHR, vkGetPhysicalDeviceSurfaceFormats2KHR, vkGetPhysicalDeviceSurfaceFormatsKHR, vkGetPhysicalDeviceSurfacePresentModesKHR, vkGetPhysicalDeviceSurfaceSupportKHR, vkGetPhysicalDeviceWaylandPresentationSupportKHR, vkGetPhysicalDeviceWin32PresentationSupportKHR, vkGetPhysicalDeviceXcbPresentationSupportKHR, vkGetPhysicalDeviceXlibPresentationSupportKHR, vkGetRandROutputDisplayEXT, vkReleaseDisplayEXT

type VkDevice = Ptr VkDevice_T Source #

VkDevice - Opaque handle to a device object

See Also

vkAcquireNextImage2KHR, vkAcquireNextImageKHR, vkAllocateCommandBuffers, vkAllocateDescriptorSets, vkAllocateMemory, vkBindBufferMemory, vkBindBufferMemory2, vkBindBufferMemory2KHR, vkBindImageMemory, vkBindImageMemory2, vkBindImageMemory2KHR, vkCreateBuffer, vkCreateBufferView, vkCreateCommandPool, vkCreateComputePipelines, vkCreateDescriptorPool, vkCreateDescriptorSetLayout, vkCreateDescriptorUpdateTemplate, vkCreateDescriptorUpdateTemplateKHR, vkCreateDevice, vkCreateEvent, vkCreateFence, vkCreateFramebuffer, vkCreateGraphicsPipelines, vkCreateImage, vkCreateImageView, vkCreateIndirectCommandsLayoutNVX, vkCreateObjectTableNVX, vkCreatePipelineCache, vkCreatePipelineLayout, vkCreateQueryPool, vkCreateRenderPass, vkCreateSampler, vkCreateSamplerYcbcrConversion, vkCreateSamplerYcbcrConversionKHR, vkCreateSemaphore, vkCreateShaderModule, vkCreateSharedSwapchainsKHR, vkCreateSwapchainKHR, vkCreateValidationCacheEXT, vkDebugMarkerSetObjectNameEXT, vkDebugMarkerSetObjectTagEXT, vkDestroyBuffer, vkDestroyBufferView, vkDestroyCommandPool, vkDestroyDescriptorPool, vkDestroyDescriptorSetLayout, vkDestroyDescriptorUpdateTemplate, vkDestroyDescriptorUpdateTemplateKHR, vkDestroyDevice, vkDestroyEvent, vkDestroyFence, vkDestroyFramebuffer, vkDestroyImage, vkDestroyImageView, vkDestroyIndirectCommandsLayoutNVX, vkDestroyObjectTableNVX, vkDestroyPipeline, vkDestroyPipelineCache, vkDestroyPipelineLayout, vkDestroyQueryPool, vkDestroyRenderPass, vkDestroySampler, vkDestroySamplerYcbcrConversion, vkDestroySamplerYcbcrConversionKHR, vkDestroySemaphore, vkDestroyShaderModule, vkDestroySwapchainKHR, vkDestroyValidationCacheEXT, vkDeviceWaitIdle, vkDisplayPowerControlEXT, vkFlushMappedMemoryRanges, vkFreeCommandBuffers, vkFreeDescriptorSets, vkFreeMemory, vkGetAndroidHardwareBufferPropertiesANDROID, vkGetBufferMemoryRequirements, vkGetBufferMemoryRequirements2, vkGetBufferMemoryRequirements2KHR, vkGetDescriptorSetLayoutSupport, vkGetDescriptorSetLayoutSupportKHR, vkGetDeviceGroupPeerMemoryFeatures, vkGetDeviceGroupPeerMemoryFeaturesKHR, vkGetDeviceGroupPresentCapabilitiesKHR, vkGetDeviceGroupSurfacePresentModesKHR, vkGetDeviceMemoryCommitment, vkGetDeviceProcAddr, vkGetDeviceQueue, vkGetDeviceQueue2, vkGetEventStatus, vkGetFenceFdKHR, vkGetFenceStatus, vkGetFenceWin32HandleKHR, vkGetImageMemoryRequirements, vkGetImageMemoryRequirements2, vkGetImageMemoryRequirements2KHR, vkGetImageSparseMemoryRequirements, vkGetImageSparseMemoryRequirements2, vkGetImageSparseMemoryRequirements2KHR, vkGetImageSubresourceLayout, vkGetMemoryAndroidHardwareBufferANDROID, vkGetMemoryFdKHR, vkGetMemoryFdPropertiesKHR, vkGetMemoryHostPointerPropertiesEXT, vkGetMemoryWin32HandleKHR, vkGetMemoryWin32HandleNV, vkGetMemoryWin32HandlePropertiesKHR, vkGetPastPresentationTimingGOOGLE, vkGetPipelineCacheData, vkGetQueryPoolResults, vkGetRefreshCycleDurationGOOGLE, vkGetRenderAreaGranularity, vkGetSemaphoreFdKHR, vkGetSemaphoreWin32HandleKHR, vkGetShaderInfoAMD, vkGetSwapchainCounterEXT, vkGetSwapchainImagesKHR, vkGetSwapchainStatusKHR, vkGetValidationCacheDataEXT, vkImportFenceFdKHR, vkImportFenceWin32HandleKHR, vkImportSemaphoreFdKHR, vkImportSemaphoreWin32HandleKHR, vkInvalidateMappedMemoryRanges, vkMapMemory, vkMergePipelineCaches, vkMergeValidationCachesEXT, vkRegisterDeviceEventEXT, vkRegisterDisplayEventEXT, vkRegisterObjectsNVX, vkResetCommandPool, vkResetDescriptorPool, vkResetEvent, vkResetFences, vkSetDebugUtilsObjectNameEXT, vkSetDebugUtilsObjectTagEXT, vkSetEvent, vkSetHdrMetadataEXT, vkTrimCommandPool, vkTrimCommandPoolKHR, vkUnmapMemory, vkUnregisterObjectsNVX, vkUpdateDescriptorSetWithTemplate, vkUpdateDescriptorSetWithTemplateKHR, vkUpdateDescriptorSets, vkWaitForFences

vkCreateInstance :: ("pCreateInfo" ::: Ptr VkInstanceCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pInstance" ::: Ptr VkInstance) -> IO VkResult Source #

vkCreateInstance - Create a new Vulkan instance

Parameters

  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.
  • pInstance points a VkInstance handle in which the resulting instance is returned.

Description

vkCreateInstance verifies that the requested layers exist. If not, vkCreateInstance will return VK_ERROR_LAYER_NOT_PRESENT. Next vkCreateInstance verifies that the requested extensions are supported (e.g. in the implementation or in any enabled instance layer) and if any requested extension is not supported, vkCreateInstance must return VK_ERROR_EXTENSION_NOT_PRESENT. After verifying and enabling the instance layers and extensions the VkInstance object is created and returned to the application. If a requested extension is only supported by a layer, both the layer and the extension need to be specified at vkCreateInstance time for the creation to succeed.

Valid Usage

Valid Usage (Implicit)

  • pCreateInfo must be a valid pointer to a valid VkInstanceCreateInfo structure
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
  • pInstance must be a valid pointer to a VkInstance handle

Return Codes

[Success] - VK_SUCCESS

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_INITIALIZATION_FAILED
  • VK_ERROR_LAYER_NOT_PRESENT
  • VK_ERROR_EXTENSION_NOT_PRESENT
  • VK_ERROR_INCOMPATIBLE_DRIVER

See Also

VkAllocationCallbacks, VkInstance, VkInstanceCreateInfo

vkDestroyInstance :: ("instance" ::: VkInstance) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #

vkDestroyInstance - Destroy an instance of Vulkan

Parameters

  • instance is the handle of the instance to destroy.
  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

  • All child objects created using instance must have been destroyed prior to destroying instance
  • If VkAllocationCallbacks were provided when instance was created, a compatible set of callbacks must be provided here
  • If no VkAllocationCallbacks were provided when instance was created, pAllocator must be NULL

Valid Usage (Implicit)

  • If instance is not NULL, instance must be a valid VkInstance handle
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure

Host Synchronization

  • Host access to instance must be externally synchronized

See Also

VkAllocationCallbacks, VkInstance

vkEnumeratePhysicalDevices :: ("instance" ::: VkInstance) -> ("pPhysicalDeviceCount" ::: Ptr Word32) -> ("pPhysicalDevices" ::: Ptr VkPhysicalDevice) -> IO VkResult Source #

vkEnumeratePhysicalDevices - Enumerates the physical devices accessible to a Vulkan instance

Parameters

  • instance is a handle to a Vulkan instance previously created with vkCreateInstance.
  • pPhysicalDeviceCount is a pointer to an integer related to the number of physical devices available or queried, as described below.
  • pPhysicalDevices is either NULL or a pointer to an array of VkPhysicalDevice handles.

Description

If pPhysicalDevices is NULL, then the number of physical devices available is returned in pPhysicalDeviceCount. Otherwise, pPhysicalDeviceCount must point to a variable set by the user to the number of elements in the pPhysicalDevices array, and on return the variable is overwritten with the number of handles actually written to pPhysicalDevices. If pPhysicalDeviceCount is less than the number of physical devices available, at most pPhysicalDeviceCount structures will be written. If pPhysicalDeviceCount is smaller than the number of physical devices available, VK_INCOMPLETE will be returned instead of VK_SUCCESS, to indicate that not all the available physical devices were returned.

Valid Usage (Implicit)

  • instance must be a valid VkInstance handle
  • pPhysicalDeviceCount must be a valid pointer to a uint32_t value
  • If the value referenced by pPhysicalDeviceCount is not 0, and pPhysicalDevices is not NULL, pPhysicalDevices must be a valid pointer to an array of pPhysicalDeviceCount VkPhysicalDevice handles

Return Codes

[Success] - VK_SUCCESS

  • VK_INCOMPLETE

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_INITIALIZATION_FAILED

See Also

VkInstance, VkPhysicalDevice

vkGetDeviceProcAddr :: ("device" ::: VkDevice) -> ("pName" ::: Ptr CChar) -> IO PFN_vkVoidFunction Source #

vkGetDeviceProcAddr - Return a function pointer for a command

Parameters

The table below defines the various use cases for vkGetDeviceProcAddr and expected return value for each case.

Description

The returned function pointer is of type PFN_vkVoidFunction, and must be cast to the type of the command being queried. The function pointer must only be called with a dispatchable object (the first parameter) that is device or a child of device.

device pName return value
NULL * undefined
invalid device * undefined
device NULL undefined
device core device-level Vulkan command fp
device enabled device extension commands fp
device * (any pName not covered above) NULL

vkGetDeviceProcAddr behavior

Valid Usage (Implicit)

  • device must be a valid VkDevice handle
  • pName must be a null-terminated UTF-8 string

See Also

PFN_vkVoidFunction, VkDevice

vkGetInstanceProcAddr :: ("instance" ::: VkInstance) -> ("pName" ::: Ptr CChar) -> IO PFN_vkVoidFunction Source #

vkGetInstanceProcAddr - Return a function pointer for a command

Parameters

  • instance is the instance that the function pointer will be compatible with, or NULL for commands not dependent on any instance.
  • pName is the name of the command to obtain.

Description

vkGetInstanceProcAddr itself is obtained in a platform- and loader- specific manner. Typically, the loader library will export this command as a function symbol, so applications can link against the loader library, or load it dynamically and look up the symbol using platform-specific APIs.

The table below defines the various use cases for vkGetInstanceProcAddr and expected return value (“fp” is “function pointer”) for each case.

The returned function pointer is of type PFN_vkVoidFunction, and must be cast to the type of the command being queried.

instance pName return value
* NULL undefined
invalid instance * undefined
NULL vkEnumerateInstanceExtensionProperties fp
NULL vkEnumerateInstanceLayerProperties fp
NULL vkCreateInstance fp
NULL * (any pName not covered above) NULL
instance core Vulkan command fp1
instance enabled instance extension commands for instance fp1
instance available device extension2 commands for instance fp1
instance * (any pName not covered above) NULL

vkGetInstanceProcAddr behavior

1
The returned function pointer must only be called with a dispatchable object (the first parameter) that is instance or a child of instance, e.g. VkInstance, VkPhysicalDevice, VkDevice, VkQueue, or VkCommandBuffer.
2
An “available device extension” is a device extension supported by any physical device enumerated by instance.

Valid Usage (Implicit)

  • If instance is not NULL, instance must be a valid VkInstance handle
  • pName must be a null-terminated UTF-8 string

See Also

PFN_vkVoidFunction, VkInstance

vkGetPhysicalDeviceProperties :: ("physicalDevice" ::: VkPhysicalDevice) -> ("pProperties" ::: Ptr VkPhysicalDeviceProperties) -> IO () Source #

vkGetPhysicalDeviceProperties - Returns properties of a physical device

Parameters

  • physicalDevice is the handle to the physical device whose properties will be queried.

Valid Usage (Implicit)

  • physicalDevice must be a valid VkPhysicalDevice handle
  • pProperties must be a valid pointer to a VkPhysicalDeviceProperties structure

See Also

VkPhysicalDevice, VkPhysicalDeviceProperties

vkGetPhysicalDeviceQueueFamilyProperties :: ("physicalDevice" ::: VkPhysicalDevice) -> ("pQueueFamilyPropertyCount" ::: Ptr Word32) -> ("pQueueFamilyProperties" ::: Ptr VkQueueFamilyProperties) -> IO () Source #

vkGetPhysicalDeviceQueueFamilyProperties - Reports properties of the queues of the specified physical device

Parameters

  • physicalDevice is the handle to the physical device whose properties will be queried.
  • pQueueFamilyPropertyCount is a pointer to an integer related to the number of queue families available or queried, as described below.
  • pQueueFamilyProperties is either NULL or a pointer to an array of VkQueueFamilyProperties structures.

Description

If pQueueFamilyProperties is NULL, then the number of queue families available is returned in pQueueFamilyPropertyCount. Otherwise, pQueueFamilyPropertyCount must point to a variable set by the user to the number of elements in the pQueueFamilyProperties array, and on return the variable is overwritten with the number of structures actually written to pQueueFamilyProperties. If pQueueFamilyPropertyCount is less than the number of queue families available, at most pQueueFamilyPropertyCount structures will be written.

Valid Usage (Implicit)

  • physicalDevice must be a valid VkPhysicalDevice handle
  • pQueueFamilyPropertyCount must be a valid pointer to a uint32_t value
  • If the value referenced by pQueueFamilyPropertyCount is not 0, and pQueueFamilyProperties is not NULL, pQueueFamilyProperties must be a valid pointer to an array of pQueueFamilyPropertyCount VkQueueFamilyProperties structures

See Also

VkPhysicalDevice, VkQueueFamilyProperties

vkGetPhysicalDeviceMemoryProperties :: ("physicalDevice" ::: VkPhysicalDevice) -> ("pMemoryProperties" ::: Ptr VkPhysicalDeviceMemoryProperties) -> IO () Source #

vkGetPhysicalDeviceMemoryProperties - Reports memory information for the specified physical device

Parameters

  • physicalDevice is the handle to the device to query.
  • pMemoryProperties points to an instance of VkPhysicalDeviceMemoryProperties structure in which the properties are returned.

Valid Usage (Implicit)

  • physicalDevice must be a valid VkPhysicalDevice handle
  • pMemoryProperties must be a valid pointer to a VkPhysicalDeviceMemoryProperties structure

See Also

VkPhysicalDevice, VkPhysicalDeviceMemoryProperties

vkGetPhysicalDeviceFeatures :: ("physicalDevice" ::: VkPhysicalDevice) -> ("pFeatures" ::: Ptr VkPhysicalDeviceFeatures) -> IO () Source #

vkGetPhysicalDeviceFeatures - Reports capabilities of a physical device

Parameters

  • physicalDevice is the physical device from which to query the supported features.
  • pFeatures is a pointer to a VkPhysicalDeviceFeatures structure in which the physical device features are returned. For each feature, a value of VK_TRUE specifies that the feature is supported on this physical device, and VK_FALSE specifies that the feature is not supported.

Valid Usage (Implicit)

  • physicalDevice must be a valid VkPhysicalDevice handle
  • pFeatures must be a valid pointer to a VkPhysicalDeviceFeatures structure

See Also

VkPhysicalDevice, VkPhysicalDeviceFeatures

vkGetPhysicalDeviceFormatProperties :: ("physicalDevice" ::: VkPhysicalDevice) -> ("format" ::: VkFormat) -> ("pFormatProperties" ::: Ptr VkFormatProperties) -> IO () Source #

vkGetPhysicalDeviceFormatProperties - Lists physical device’s format capabilities

Parameters

  • physicalDevice is the physical device from which to query the format properties.
  • format is the format whose properties are queried.
  • pFormatProperties is a pointer to a VkFormatProperties structure in which physical device properties for format are returned.

Valid Usage (Implicit)

  • physicalDevice must be a valid VkPhysicalDevice handle
  • format must be a valid VkFormat value
  • pFormatProperties must be a valid pointer to a VkFormatProperties structure

See Also

VkFormat, VkFormatProperties, VkPhysicalDevice

vkGetPhysicalDeviceImageFormatProperties :: ("physicalDevice" ::: VkPhysicalDevice) -> ("format" ::: VkFormat) -> ("type" ::: VkImageType) -> ("tiling" ::: VkImageTiling) -> ("usage" ::: VkImageUsageFlags) -> ("flags" ::: VkImageCreateFlags) -> ("pImageFormatProperties" ::: Ptr VkImageFormatProperties) -> IO VkResult Source #

vkGetPhysicalDeviceImageFormatProperties - Lists physical device’s image format capabilities

Parameters

  • physicalDevice is the physical device from which to query the image capabilities.

Description

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.

Valid Usage (Implicit)

  • physicalDevice must be a valid VkPhysicalDevice handle

Return Codes

[Success] - VK_SUCCESS

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_FORMAT_NOT_SUPPORTED

See Also

VkFormat, VkImageCreateFlags, VkImageFormatProperties, VkImageTiling, VkImageType, VkImageUsageFlags, VkPhysicalDevice

data VkExtent3D Source #

Constructors

VkExtent3D 

Fields

data VkPhysicalDeviceProperties Source #

VkPhysicalDeviceProperties - Structure specifying physical device properties

Description

The vendorID and deviceID fields are provided to allow applications to adapt to device characteristics that are not adequately exposed by other Vulkan queries.

Note

These may include performance profiles, hardware errata, or other characteristics.

The vendor identified by vendorID is the entity responsible for the most salient characteristics of the underlying implementation of the VkPhysicalDevice being queried.

Note

For example, in the case of a discrete GPU implementation, this should be the GPU chipset vendor. In the case of a hardware accelerator integrated into a system-on-chip (SoC), this should be the supplier of the silicon IP used to create the accelerator.

If the vendor has a PCI vendor ID, the low 16 bits of vendorID must contain that PCI vendor ID, and the remaining bits must be set to zero. Otherwise, the value returned must be a valid Khronos vendor ID, obtained as described in the Vulkan Documentation and Extensions document in the section “Registering a Vendor ID with Khronos”. Khronos vendor IDs are allocated starting at 0x10000, to distinguish them from the PCI vendor ID namespace.

The vendor is also responsible for the value returned in deviceID. If the implementation is driven primarily by a PCI device with a PCI device ID, the low 16 bits of deviceID must contain that PCI device ID, and the remaining bits must be set to zero. Otherwise, the choice of what values to return may be dictated by operating system or platform policies - but should uniquely identify both the device version and any major configuration options (for example, core count in the case of multicore devices).

Note

The same device ID should be used for all physical implementations of that device version and configuration. For example, all uses of a specific silicon IP GPU version and configuration should use the same device ID, even if those uses occur in different SoCs.

See Also

VkPhysicalDeviceLimits, VkPhysicalDeviceProperties2, VkPhysicalDeviceSparseProperties, VkPhysicalDeviceType, vkGetPhysicalDeviceProperties

Constructors

VkPhysicalDeviceProperties 

Fields

data VkApplicationInfo Source #

VkApplicationInfo - Structure specifying application info

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_APPLICATION_INFO
  • pNext must be NULL
  • If pApplicationName is not NULL, pApplicationName must be a null-terminated UTF-8 string
  • If pEngineName is not NULL, pEngineName must be a null-terminated UTF-8 string

See Also

VkInstanceCreateInfo, VkStructureType

Constructors

VkApplicationInfo 

Fields

  • vkSType :: VkStructureType

    sType is the type of this structure.

  • vkPNext :: Ptr ()

    pNext is NULL or a pointer to an extension-specific structure.

  • vkPApplicationName :: Ptr CChar

    pApplicationName is NULL or is a pointer to a null-terminated UTF-8 string containing the name of the application.

  • vkApplicationVersion :: Word32

    applicationVersion is an unsigned integer variable containing the developer-supplied version number of the application.

  • vkPEngineName :: Ptr CChar

    pEngineName is NULL or is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application.

  • vkEngineVersion :: Word32

    engineVersion is an unsigned integer variable containing the developer-supplied version number of the engine used to create the application.

  • vkApiVersion :: Word32

    apiVersion is the version of the Vulkan API against which the application expects to run, encoded as described in the API Version Numbers and Semantics section. If apiVersion is 0 the implementation must ignore it, otherwise if the implementation does not support the requested apiVersion, or an effective substitute for apiVersion, it must return VK_ERROR_INCOMPATIBLE_DRIVER. The patch version number specified in apiVersion is ignored when creating an instance object. Only the major and minor versions of the instance must match those requested in apiVersion.

data VkAllocationCallbacks Source #

VkAllocationCallbacks - Structure containing callback function pointers for memory allocation

Valid Usage

  • pfnReallocation must be a valid pointer to a valid user-defined PFN_vkReallocationFunction
  • pfnFree must be a valid pointer to a valid user-defined PFN_vkFreeFunction
  • If either of pfnInternalAllocation or pfnInternalFree is not NULL, both must be valid callbacks

See Also

PFN_vkAllocationFunction, PFN_vkFreeFunction, PFN_vkInternalAllocationNotification, PFN_vkInternalFreeNotification, PFN_vkReallocationFunction, vkAllocateMemory, vkCreateAndroidSurfaceKHR, vkCreateBuffer, vkCreateBufferView, vkCreateCommandPool, vkCreateComputePipelines, vkCreateDebugReportCallbackEXT, vkCreateDebugUtilsMessengerEXT, vkCreateDescriptorPool, vkCreateDescriptorSetLayout, vkCreateDescriptorUpdateTemplate, vkCreateDescriptorUpdateTemplateKHR, vkCreateDevice, vkCreateDisplayModeKHR, vkCreateDisplayPlaneSurfaceKHR, vkCreateEvent, vkCreateFence, vkCreateFramebuffer, vkCreateGraphicsPipelines, vkCreateIOSSurfaceMVK, vkCreateImage, vkCreateImageView, vkCreateIndirectCommandsLayoutNVX, vkCreateInstance, vkCreateMacOSSurfaceMVK, vkCreateMirSurfaceKHR, vkCreateObjectTableNVX, vkCreatePipelineCache, vkCreatePipelineLayout, vkCreateQueryPool, vkCreateRenderPass, vkCreateSampler, vkCreateSamplerYcbcrConversion, vkCreateSamplerYcbcrConversionKHR, vkCreateSemaphore, vkCreateShaderModule, vkCreateSharedSwapchainsKHR, vkCreateSwapchainKHR, vkCreateValidationCacheEXT, vkCreateViSurfaceNN, vkCreateWaylandSurfaceKHR, vkCreateWin32SurfaceKHR, vkCreateXcbSurfaceKHR, vkCreateXlibSurfaceKHR, vkDestroyBuffer, vkDestroyBufferView, vkDestroyCommandPool, vkDestroyDebugReportCallbackEXT, vkDestroyDebugUtilsMessengerEXT, vkDestroyDescriptorPool, vkDestroyDescriptorSetLayout, vkDestroyDescriptorUpdateTemplate, vkDestroyDescriptorUpdateTemplateKHR, vkDestroyDevice, vkDestroyEvent, vkDestroyFence, vkDestroyFramebuffer, vkDestroyImage, vkDestroyImageView, vkDestroyIndirectCommandsLayoutNVX, vkDestroyInstance, vkDestroyObjectTableNVX, vkDestroyPipeline, vkDestroyPipelineCache, vkDestroyPipelineLayout, vkDestroyQueryPool, vkDestroyRenderPass, vkDestroySampler, vkDestroySamplerYcbcrConversion, vkDestroySamplerYcbcrConversionKHR, vkDestroySemaphore, vkDestroyShaderModule, vkDestroySurfaceKHR, vkDestroySwapchainKHR, vkDestroyValidationCacheEXT, vkFreeMemory, vkRegisterDeviceEventEXT, vkRegisterDisplayEventEXT

Constructors

VkAllocationCallbacks 

Fields

data VkInstanceCreateInfo Source #

VkInstanceCreateInfo - Structure specifying parameters of a newly created instance

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
  • Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDebugReportCallbackCreateInfoEXT, VkDebugUtilsMessengerCreateInfoEXT, or VkValidationFlagsEXT
  • Each sType member in the pNext chain must be unique
  • flags must be 0
  • If pApplicationInfo is not NULL, pApplicationInfo must be a valid pointer to a valid VkApplicationInfo structure
  • If enabledLayerCount is not 0, ppEnabledLayerNames must be a valid pointer to an array of enabledLayerCount null-terminated UTF-8 strings
  • If enabledExtensionCount is not 0, ppEnabledExtensionNames must be a valid pointer to an array of enabledExtensionCount null-terminated UTF-8 strings

See Also

VkApplicationInfo, VkInstanceCreateFlags, VkStructureType, vkCreateInstance

Constructors

VkInstanceCreateInfo 

Fields

data VkQueueFamilyProperties Source #

VkQueueFamilyProperties - Structure providing information about a queue family

Description

The value returned in minImageTransferGranularity has a unit of compressed texel blocks for images having a block-compressed format, and a unit of texels otherwise.

Possible values of minImageTransferGranularity are:

  • (0,0,0) which indicates that only whole mip levels must be transferred using the image transfer operations on the corresponding queues. In this case, the following restrictions apply to all offset and extent parameters of image transfer operations:

    • The x, y, and z members of a VkOffset3D parameter must always be zero.
    • The width, height, and depth members of a VkExtent3D parameter must always match the width, height, and depth of the image subresource corresponding to the parameter, respectively.
  • (Ax, Ay, Az) where Ax, Ay, and Az are all integer powers of two. In this case the following restrictions apply to all image transfer operations:

    • x, y, and z of a VkOffset3D parameter must be integer multiples of Ax, Ay, and Az, respectively.
    • width of a VkExtent3D parameter must be an integer multiple of Ax, or else x + width must equal the width of the image subresource corresponding to the parameter.
    • height of a VkExtent3D parameter must be an integer multiple of Ay, or else y + height must equal the height of the image subresource corresponding to the parameter.
    • depth of a VkExtent3D parameter must be an integer multiple of Az, or else z + depth must equal the depth of the image subresource corresponding to the parameter.
    • If the format of the image corresponding to the parameters is one of the block-compressed formats then for the purposes of the above calculations the granularity must be scaled up by the compressed texel block dimensions.

Queues supporting graphics and/or compute operations must report (1,1,1) in minImageTransferGranularity, meaning that there are no additional restrictions on the granularity of image transfer operations for these queues. Other queues supporting image transfer operations are only required to support whole mip level transfers, thus minImageTransferGranularity for queues belonging to such queue families may be (0,0,0).

The Device Memory section describes memory properties queried from the physical device.

For physical device feature queries see the Features chapter.

See Also

VkExtent3D, VkQueueFamilyProperties2, VkQueueFlags, vkGetPhysicalDeviceQueueFamilyProperties

Constructors

VkQueueFamilyProperties 

Fields

  • vkQueueFlags :: VkQueueFlags

    queueFlags is a bitmask of VkQueueFlagBits indicating capabilities of the queues in this queue family.

  • vkQueueCount :: Word32

    queueCount is the unsigned integer count of queues in this queue family.

  • vkTimestampValidBits :: Word32

    timestampValidBits is the unsigned integer count of meaningful bits in the timestamps written via vkCmdWriteTimestamp. The valid range for the count is 36..64 bits, or a value of 0, indicating no support for timestamps. Bits outside the valid range are guaranteed to be zeros.

  • vkMinImageTransferGranularity :: VkExtent3D

    minImageTransferGranularity is the minimum granularity supported for image transfer operations on the queues in this queue family.

data VkPhysicalDeviceMemoryProperties Source #

VkPhysicalDeviceMemoryProperties - Structure specifying physical device memory properties

Description

The VkPhysicalDeviceMemoryProperties structure describes a number of memory heaps as well as a number of memory types that can be used to access memory allocated in those heaps. Each heap describes a memory resource of a particular size, and each memory type describes a set of memory properties (e.g. host cached vs uncached) that can be used with a given memory heap. Allocations using a particular memory type will consume resources from the heap indicated by that memory type’s heap index. More than one memory type may share each heap, and the heaps and memory types provide a mechanism to advertise an accurate size of the physical memory resources while allowing the memory to be used with a variety of different properties.

The number of memory heaps is given by memoryHeapCount and is less than or equal to VK_MAX_MEMORY_HEAPS. Each heap is described by an element of the memoryHeaps array as a VkMemoryHeap structure. The number of memory types available across all memory heaps is given by memoryTypeCount and is less than or equal to VK_MAX_MEMORY_TYPES. Each memory type is described by an element of the memoryTypes array as a VkMemoryType structure.

At least one heap must include VK_MEMORY_HEAP_DEVICE_LOCAL_BIT in VkMemoryHeap::flags. If there are multiple heaps that all have similar performance characteristics, they may all include VK_MEMORY_HEAP_DEVICE_LOCAL_BIT. In a unified memory architecture (UMA) system there is often only a single memory heap which is considered to be equally “local” to the host and to the device, and such an implementation must advertise the heap as device-local.

Each memory type returned by vkGetPhysicalDeviceMemoryProperties must have its propertyFlags set to one of the following values:

  • 0
  • VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
  • VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT
  • VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
  • VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
  • VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
  • VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT
  • VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
  • VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT

There must be at least one memory type with both the VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT and VK_MEMORY_PROPERTY_HOST_COHERENT_BIT bits set in its propertyFlags. There must be at least one memory type with the VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit set in its propertyFlags.

For each pair of elements X and Y returned in memoryTypes, X must be placed at a lower index position than Y if:

  • either the set of bit flags returned in the propertyFlags member of X is a strict subset of the set of bit flags returned in the propertyFlags member of Y.
  • or the propertyFlags members of X and Y are equal, and X belongs to a memory heap with greater performance (as determined in an implementation-specific manner).

Note

There is no ordering requirement between X and Y elements for the case their propertyFlags members are not in a subset relation. That potentially allows more than one possible way to order the same set of memory types. Notice that the list of all allowed memory property flag combinations is written in the required order. But if instead VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT was before VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, the list would still be in the required order.

This ordering requirement enables applications to use a simple search loop to select the desired memory type along the lines of:

// Find a memory in `memoryTypeBitsRequirement` that includes all of `requiredProperties`
int32_t findProperties(const VkPhysicalDeviceMemoryProperties* pMemoryProperties,
                       uint32_t memoryTypeBitsRequirement,
                       VkMemoryPropertyFlags requiredProperties) {
    const uint32_t memoryCount = pMemoryProperties->memoryTypeCount;
    for (uint32_t memoryIndex = 0; memoryIndex < memoryCount; ++memoryIndex) {
        const uint32_t memoryTypeBits = (1 << memoryIndex);
        const bool isRequiredMemoryType = memoryTypeBitsRequirement & memoryTypeBits;

        const VkMemoryPropertyFlags properties =
            pMemoryProperties->memoryTypes[memoryIndex].propertyFlags;
        const bool hasRequiredProperties =
            (properties & requiredProperties) == requiredProperties;

        if (isRequiredMemoryType && hasRequiredProperties)
            return static_cast<int32_t>(memoryIndex);
    }

    // failed to find memory type
    return -1;
}

// Try to find an optimal memory type, or if it does not exist try fallback memory type
// `device` is the VkDevice
// `image` is the VkImage that requires memory to be bound
// `memoryProperties` properties as returned by vkGetPhysicalDeviceMemoryProperties
// `requiredProperties` are the property flags that must be present
// `optimalProperties` are the property flags that are preferred by the application
VkMemoryRequirements memoryRequirements;
vkGetImageMemoryRequirements(device, image, &memoryRequirements);
int32_t memoryType =
    findProperties(&memoryProperties, memoryRequirements.memoryTypeBits, optimalProperties);
if (memoryType == -1) // not found; try fallback properties
    memoryType =
        findProperties(&memoryProperties, memoryRequirements.memoryTypeBits, requiredProperties);

See Also

VkMemoryHeap, VkMemoryType, VkPhysicalDeviceMemoryProperties2, vkGetPhysicalDeviceMemoryProperties

Constructors

VkPhysicalDeviceMemoryProperties 

Fields

data VkMemoryType Source #

VkMemoryType - Structure specifying memory type

See Also

VkMemoryPropertyFlags, VkPhysicalDeviceMemoryProperties

Constructors

VkMemoryType 

Fields

data VkMemoryHeap Source #

VkMemoryHeap - Structure specifying a memory heap

See Also

VkDeviceSize, VkMemoryHeapFlags, VkPhysicalDeviceMemoryProperties

Constructors

VkMemoryHeap 

Fields

data VkFormatProperties Source #

VkFormatProperties - Structure specifying image format properties

Description

Note

If no format feature flags are supported, the format itself is not supported, and images of that format cannot be created.

If format is a block-compression format, then buffers must not support any features for the format.

See Also

VkFormatFeatureFlags, VkFormatProperties2, vkGetPhysicalDeviceFormatProperties

Constructors

VkFormatProperties 

Fields

data VkImageFormatProperties Source #

VkImageFormatProperties - Structure specifying a image format properties

Members

  • maxExtent are the maximum image dimensions. See the Allowed Extent Values section below for how these values are constrained by type.
  • maxMipLevels is the maximum number of mipmap levels. maxMipLevels must be equal to ⌈log2(max(width, height, depth))⌉ + 1, where width, height, and depth are taken from the corresponding members of maxExtent, except when one of the following conditions is true, in which case it may instead be 1:

  • maxArrayLayers is the maximum number of array layers. maxArrayLayers must either be equal to 1 or be greater than or equal to the maxImageArrayLayers member of VkPhysicalDeviceLimits. A value of 1 is valid only if tiling is VK_IMAGE_TILING_LINEAR or if type is VK_IMAGE_TYPE_3D.
  • sampleCounts is a bitmask of VkSampleCountFlagBits specifying all the supported sample counts for this image as described below.
  • maxResourceSize is an upper bound on the total image size in bytes, inclusive of all image subresources. Implementations may have an address space limit on total size of a resource, which is advertised by this property. maxResourceSize must be at least 231.

Description

Note

There is no mechanism to query the size of an image before creating it, to compare that size against maxResourceSize. If an application attempts to create an image that exceeds this limit, the creation will fail and vkCreateImage will return VK_ERROR_OUT_OF_DEVICE_MEMORY. While the advertised limit must be at least 231, it may not be possible to create an image that approaches that size, particularly for VK_IMAGE_TYPE_1D.

If the combination of parameters to vkGetPhysicalDeviceImageFormatProperties is not supported by the implementation for use in vkCreateImage, then all members of VkImageFormatProperties will be filled with zero.

Note

Filling VkImageFormatProperties with zero for unsupported formats is an exception to the usual rule that output structures have undefined contents on error. This exception was unintentional, but is preserved for backwards compatibility.

See Also

VkDeviceSize, VkExtent3D, VkExternalImageFormatPropertiesNV, VkImageFormatProperties2, VkSampleCountFlags, vkGetPhysicalDeviceImageFormatProperties

data VkPhysicalDeviceFeatures Source #

VkPhysicalDeviceFeatures - Structure describing the fine-grained features that can be supported by an implementation

Members

The members of the VkPhysicalDeviceFeatures structure describe the following features:

Description

  • robustBufferAccess specifies that accesses to buffers are bounds-checked against the range of the buffer descriptor (as determined by VkDescriptorBufferInfo::range, VkBufferViewCreateInfo::range, or the size of the buffer). Out of bounds accesses must not cause application termination, and the effects of shader loads, stores, and atomics must conform to an implementation-dependent behavior as described below.

    • A buffer access is considered to be out of bounds if any of the following are true:

      • The pointer was formed by OpImageTexelPointer and the coordinate is less than zero or greater than or equal to the number of whole elements in the bound range.
      • The pointer was not formed by OpImageTexelPointer and the object pointed to is not wholly contained within the bound range. This includes accesses performed via /variable pointers/ where the buffer descriptor being accessed cannot be statically determined. Uninitialized pointers and pointers equal to OpConstantNull are treated as pointing to a zero-sized object, so all accesses through such pointers are considered to be out of bounds.

        Note

        If a SPIR-V OpLoad instruction loads a structure and the tail end of the structure is out of bounds, then all members of the structure are considered out of bounds even if the members at the end are not statically used.

      • If any buffer access in a given SPIR-V block is determined to be out of bounds, then any other access of the same type (load, store, or atomic) in the same SPIR-V block that accesses an address less than 16 bytes away from the out of bounds address may also be considered out of bounds.
    • Out-of-bounds buffer loads will return any of the following values:

      • Values from anywhere within the memory range(s) bound to the buffer (possibly including bytes of memory past the end of the buffer, up to the end of the bound range).
      • Zero values, or (0,0,0,x) vectors for vector reads where x is a valid value represented in the type of the vector components and may be any of:

        • 0, 1, or the maximum representable positive integer value, for signed or unsigned integer components
        • 0.0 or 1.0, for floating-point components
    • Out-of-bounds writes may modify values within the memory range(s) bound to the buffer, but must not modify any other memory.
    • Out-of-bounds atomics may modify values within the memory range(s) bound to the buffer, but must not modify any other memory, and return an undefined value.
    • Vertex input attributes are considered out of bounds if the offset of the attribute in the bound vertex buffer range plus the size of the attribute is greater than either:

      • vertexBufferRangeSize, if bindingStride == 0; or
      • (vertexBufferRangeSize - (vertexBufferRangeSize % bindingStride))

      where vertexBufferRangeSize is the byte size of the memory range bound to the vertex buffer binding and bindingStride is the byte stride of the corresponding vertex input binding. Further, if any vertex input attribute using a specific vertex input binding is out of bounds, then all vertex input attributes using that vertex input binding for that vertex shader invocation are considered out of bounds.

      • If a vertex input attribute is out of bounds, it will be assigned one of the following values:

        • Values from anywhere within the memory range(s) bound to the buffer, converted according to the format of the attribute.
        • Zero values, format converted according to the format of the attribute.
        • Zero values, or (0,0,0,x) vectors, as described above.
    • If robustBufferAccess is not enabled, out of bounds accesses may corrupt any memory within the process and cause undefined behavior up to and including application termination.
  • fullDrawIndexUint32 specifies the full 32-bit range of indices is supported for indexed draw calls when using a VkIndexType of VK_INDEX_TYPE_UINT32. maxDrawIndexedIndexValue is the maximum index value that may be used (aside from the primitive restart index, which is always 232-1 when the VkIndexType is VK_INDEX_TYPE_UINT32). If this feature is supported, maxDrawIndexedIndexValue must be 232-1; otherwise it must be no smaller than 224-1. See maxDrawIndexedIndexValue.
  • imageCubeArray specifies whether image views with a VkImageViewType of VK_IMAGE_VIEW_TYPE_CUBE_ARRAY can be created, and that the corresponding SampledCubeArray and ImageCubeArray SPIR-V capabilities can be used in shader code.
  • independentBlend specifies whether the VkPipelineColorBlendAttachmentState settings are controlled independently per-attachment. If this feature is not enabled, the VkPipelineColorBlendAttachmentState settings for all color attachments must be identical. Otherwise, a different VkPipelineColorBlendAttachmentState can be provided for each bound color attachment.
  • geometryShader specifies whether geometry shaders are supported. If this feature is not enabled, the VK_SHADER_STAGE_GEOMETRY_BIT and VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT enum values must not be used. This also specifies whether shader modules can declare the Geometry capability.
  • tessellationShader specifies whether tessellation control and evaluation shaders are supported. If this feature is not enabled, the VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, and VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO enum values must not be used. This also specifies whether shader modules can declare the Tessellation capability.
  • sampleRateShading specifies whether Sample Shading and multisample interpolation are supported. If this feature is not enabled, the sampleShadingEnable member of the VkPipelineMultisampleStateCreateInfo structure must be set to VK_FALSE and the minSampleShading member is ignored. This also specifies whether shader modules can declare the SampleRateShading capability.
  • dualSrcBlend specifies whether blend operations which take two sources are supported. If this feature is not enabled, the VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, and VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA enum values must not be used as source or destination blending factors. See {html_spec_relative}#framebuffer-dsb.
  • logicOp specifies whether logic operations are supported. If this feature is not enabled, the logicOpEnable member of the VkPipelineColorBlendStateCreateInfo structure must be set to VK_FALSE, and the logicOp member is ignored.
  • multiDrawIndirect specifies whether multiple draw indirect is supported. If this feature is not enabled, the drawCount parameter to the vkCmdDrawIndirect and vkCmdDrawIndexedIndirect commands must be 0 or 1. The maxDrawIndirectCount member of the VkPhysicalDeviceLimits structure must also be 1 if this feature is not supported. See maxDrawIndirectCount.
  • drawIndirectFirstInstance specifies whether indirect draw calls support the firstInstance parameter. If this feature is not enabled, the firstInstance member of all VkDrawIndirectCommand and VkDrawIndexedIndirectCommand structures that are provided to the vkCmdDrawIndirect and vkCmdDrawIndexedIndirect commands must be 0.
  • depthClamp specifies whether depth clamping is supported. If this feature is not enabled, the depthClampEnable member of the VkPipelineRasterizationStateCreateInfo structure must be set to VK_FALSE. Otherwise, setting depthClampEnable to VK_TRUE will enable depth clamping.
  • depthBiasClamp specifies whether depth bias clamping is supported. If this feature is not enabled, the depthBiasClamp member of the VkPipelineRasterizationStateCreateInfo structure must be set to 0.0 unless the VK_DYNAMIC_STATE_DEPTH_BIAS dynamic state is enabled, and the depthBiasClamp parameter to vkCmdSetDepthBias must be set to 0.0.
  • fillModeNonSolid specifies whether point and wireframe fill modes are supported. If this feature is not enabled, the VK_POLYGON_MODE_POINT and VK_POLYGON_MODE_LINE enum values must not be used.
  • depthBounds specifies whether depth bounds tests are supported. If this feature is not enabled, the depthBoundsTestEnable member of the VkPipelineDepthStencilStateCreateInfo structure must be set to VK_FALSE. When depthBoundsTestEnable is set to VK_FALSE, the minDepthBounds and maxDepthBounds members of the VkPipelineDepthStencilStateCreateInfo structure are ignored.
  • wideLines specifies whether lines with width other than 1.0 are supported. If this feature is not enabled, the lineWidth member of the VkPipelineRasterizationStateCreateInfo structure must be set to 1.0 unless the VK_DYNAMIC_STATE_LINE_WIDTH dynamic state is enabled, and the lineWidth parameter to vkCmdSetLineWidth must be set to 1.0. When this feature is supported, the range and granularity of supported line widths are indicated by the lineWidthRange and lineWidthGranularity members of the VkPhysicalDeviceLimits structure, respectively.
  • largePoints specifies whether points with size greater than 1.0 are supported. If this feature is not enabled, only a point size of 1.0 written by a shader is supported. The range and granularity of supported point sizes are indicated by the pointSizeRange and pointSizeGranularity members of the VkPhysicalDeviceLimits structure, respectively.
  • alphaToOne specifies whether the implementation is able to replace the alpha value of the color fragment output from the fragment shader with the maximum representable alpha value for fixed-point colors or 1.0 for floating-point colors. If this feature is not enabled, then the alphaToOneEnable member of the VkPipelineMultisampleStateCreateInfo structure must be set to VK_FALSE. Otherwise setting alphaToOneEnable to VK_TRUE will enable alpha-to-one behavior.
  • multiViewport specifies whether more than one viewport is supported. If this feature is not enabled, the viewportCount and scissorCount members of the VkPipelineViewportStateCreateInfo structure must be set to 1. Similarly, the viewportCount parameter to the vkCmdSetViewport command and the scissorCount parameter to the vkCmdSetScissor command must be 1, and the firstViewport parameter to the vkCmdSetViewport command and the firstScissor parameter to the vkCmdSetScissor command must be 0.
  • samplerAnisotropy specifies whether anisotropic filtering is supported. If this feature is not enabled, the anisotropyEnable member of the VkSamplerCreateInfo structure must be VK_FALSE.
  • textureCompressionETC2 specifies whether all of the ETC2 and EAC compressed texture formats are supported. If this feature is enabled, then the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, VK_FORMAT_FEATURE_BLIT_SRC_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must be supported in optimalTilingFeatures for the following formats:

    • VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK
    • VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK
    • VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK
    • VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK
    • VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK
    • VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK
    • VK_FORMAT_EAC_R11_UNORM_BLOCK
    • VK_FORMAT_EAC_R11_SNORM_BLOCK
    • VK_FORMAT_EAC_R11G11_UNORM_BLOCK
    • VK_FORMAT_EAC_R11G11_SNORM_BLOCK

    vkGetPhysicalDeviceFormatProperties and vkGetPhysicalDeviceImageFormatProperties can be used to check for additional supported properties of individual formats.

  • textureCompressionASTC_LDR specifies whether all of the ASTC LDR compressed texture formats are supported. If this feature is enabled, then the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, VK_FORMAT_FEATURE_BLIT_SRC_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must be supported in optimalTilingFeatures for the following formats:

    • VK_FORMAT_ASTC_4x4_UNORM_BLOCK
    • VK_FORMAT_ASTC_4x4_SRGB_BLOCK
    • VK_FORMAT_ASTC_5x4_UNORM_BLOCK
    • VK_FORMAT_ASTC_5x4_SRGB_BLOCK
    • VK_FORMAT_ASTC_5x5_UNORM_BLOCK
    • VK_FORMAT_ASTC_5x5_SRGB_BLOCK
    • VK_FORMAT_ASTC_6x5_UNORM_BLOCK
    • VK_FORMAT_ASTC_6x5_SRGB_BLOCK
    • VK_FORMAT_ASTC_6x6_UNORM_BLOCK
    • VK_FORMAT_ASTC_6x6_SRGB_BLOCK
    • VK_FORMAT_ASTC_8x5_UNORM_BLOCK
    • VK_FORMAT_ASTC_8x5_SRGB_BLOCK
    • VK_FORMAT_ASTC_8x6_UNORM_BLOCK
    • VK_FORMAT_ASTC_8x6_SRGB_BLOCK
    • VK_FORMAT_ASTC_8x8_UNORM_BLOCK
    • VK_FORMAT_ASTC_8x8_SRGB_BLOCK
    • VK_FORMAT_ASTC_10x5_UNORM_BLOCK
    • VK_FORMAT_ASTC_10x5_SRGB_BLOCK
    • VK_FORMAT_ASTC_10x6_UNORM_BLOCK
    • VK_FORMAT_ASTC_10x6_SRGB_BLOCK
    • VK_FORMAT_ASTC_10x8_UNORM_BLOCK
    • VK_FORMAT_ASTC_10x8_SRGB_BLOCK
    • VK_FORMAT_ASTC_10x10_UNORM_BLOCK
    • VK_FORMAT_ASTC_10x10_SRGB_BLOCK
    • VK_FORMAT_ASTC_12x10_UNORM_BLOCK
    • VK_FORMAT_ASTC_12x10_SRGB_BLOCK
    • VK_FORMAT_ASTC_12x12_UNORM_BLOCK
    • VK_FORMAT_ASTC_12x12_SRGB_BLOCK

    vkGetPhysicalDeviceFormatProperties and vkGetPhysicalDeviceImageFormatProperties can be used to check for additional supported properties of individual formats.

  • textureCompressionBC specifies whether all of the BC compressed texture formats are supported. If this feature is enabled, then the VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, VK_FORMAT_FEATURE_BLIT_SRC_BIT and VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT features must be supported in optimalTilingFeatures for the following formats:

    • VK_FORMAT_BC1_RGB_UNORM_BLOCK
    • VK_FORMAT_BC1_RGB_SRGB_BLOCK
    • VK_FORMAT_BC1_RGBA_UNORM_BLOCK
    • VK_FORMAT_BC1_RGBA_SRGB_BLOCK
    • VK_FORMAT_BC2_UNORM_BLOCK
    • VK_FORMAT_BC2_SRGB_BLOCK
    • VK_FORMAT_BC3_UNORM_BLOCK
    • VK_FORMAT_BC3_SRGB_BLOCK
    • VK_FORMAT_BC4_UNORM_BLOCK
    • VK_FORMAT_BC4_SNORM_BLOCK
    • VK_FORMAT_BC5_UNORM_BLOCK
    • VK_FORMAT_BC5_SNORM_BLOCK
    • VK_FORMAT_BC6H_UFLOAT_BLOCK
    • VK_FORMAT_BC6H_SFLOAT_BLOCK
    • VK_FORMAT_BC7_UNORM_BLOCK
    • VK_FORMAT_BC7_SRGB_BLOCK

    vkGetPhysicalDeviceFormatProperties and vkGetPhysicalDeviceImageFormatProperties can be used to check for additional supported properties of individual formats.

  • occlusionQueryPrecise specifies whether occlusion queries returning actual sample counts are supported. Occlusion queries are created in a VkQueryPool by specifying the queryType of VK_QUERY_TYPE_OCCLUSION in the VkQueryPoolCreateInfo structure which is passed to vkCreateQueryPool. If this feature is enabled, queries of this type can enable VK_QUERY_CONTROL_PRECISE_BIT in the flags parameter to vkCmdBeginQuery. If this feature is not supported, the implementation supports only boolean occlusion queries. When any samples are passed, boolean queries will return a non-zero result value, otherwise a result value of zero is returned. When this feature is enabled and VK_QUERY_CONTROL_PRECISE_BIT is set, occlusion queries will report the actual number of samples passed.
  • pipelineStatisticsQuery specifies whether the pipeline statistics queries are supported. If this feature is not enabled, queries of type VK_QUERY_TYPE_PIPELINE_STATISTICS cannot be created, and none of the VkQueryPipelineStatisticFlagBits bits can be set in the pipelineStatistics member of the VkQueryPoolCreateInfo structure.
  • vertexPipelineStoresAndAtomics specifies whether storage buffers and images support stores and atomic operations in the vertex, tessellation, and geometry shader stages. If this feature is not enabled, all storage image, storage texel buffers, and storage buffer variables used by these stages in shader modules must be decorated with the NonWriteable decoration (or the readonly memory qualifier in GLSL).
  • fragmentStoresAndAtomics specifies whether storage buffers and images support stores and atomic operations in the fragment shader stage. If this feature is not enabled, all storage image, storage texel buffers, and storage buffer variables used by the fragment stage in shader modules must be decorated with the NonWriteable decoration (or the readonly memory qualifier in GLSL).
  • shaderTessellationAndGeometryPointSize specifies whether the PointSize built-in decoration is available in the tessellation control, tessellation evaluation, and geometry shader stages. If this feature is not enabled, members decorated with the PointSize built-in decoration must not be read from or written to and all points written from a tessellation or geometry shader will have a size of 1.0. This also specifies whether shader modules can declare the TessellationPointSize capability for tessellation control and evaluation shaders, or if the shader modules can declare the GeometryPointSize capability for geometry shaders. An implementation supporting this feature must also support one or both of the @tessellationShader@ or @geometryShader@ features.
  • shaderImageGatherExtended specifies whether the extended set of image gather instructions are available in shader code. If this feature is not enabled, the OpImage*Gather instructions do not support the Offset and ConstOffsets operands. This also specifies whether shader modules can declare the ImageGatherExtended capability.
  • shaderStorageImageExtendedFormats specifies whether the extended storage image formats are available in shader code. If this feature is not enabled, the formats requiring the StorageImageExtendedFormats capability are not supported for storage images. This also specifies whether shader modules can declare the StorageImageExtendedFormats capability.
  • shaderStorageImageMultisample specifies whether multisampled storage images are supported. If this feature is not enabled, images that are created with a usage that includes VK_IMAGE_USAGE_STORAGE_BIT must be created with samples equal to VK_SAMPLE_COUNT_1_BIT. This also specifies whether shader modules can declare the StorageImageMultisample capability.
  • shaderStorageImageReadWithoutFormat specifies whether storage images require a format qualifier to be specified when reading from storage images. If this feature is not enabled, the OpImageRead instruction must not have an OpTypeImage of Unknown. This also specifies whether shader modules can declare the StorageImageReadWithoutFormat capability.
  • shaderStorageImageWriteWithoutFormat specifies whether storage images require a format qualifier to be specified when writing to storage images. If this feature is not enabled, the OpImageWrite instruction must not have an OpTypeImage of Unknown. This also specifies whether shader modules can declare the StorageImageWriteWithoutFormat capability.
  • shaderUniformBufferArrayDynamicIndexing specifies whether arrays of uniform buffers can be indexed by dynamically uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also specifies whether shader modules can declare the UniformBufferArrayDynamicIndexing capability.
  • shaderSampledImageArrayDynamicIndexing specifies whether arrays of samplers or sampled images can be indexed by dynamically uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, or VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also specifies whether shader modules can declare the SampledImageArrayDynamicIndexing capability.
  • shaderStorageBufferArrayDynamicIndexing specifies whether arrays of storage buffers can be indexed by dynamically uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also specifies whether shader modules can declare the StorageBufferArrayDynamicIndexing capability.
  • shaderStorageImageArrayDynamicIndexing specifies whether arrays of storage images can be indexed by dynamically uniform integer expressions in shader code. If this feature is not enabled, resources with a descriptor type of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE must be indexed only by constant integral expressions when aggregated into arrays in shader code. This also specifies whether shader modules can declare the StorageImageArrayDynamicIndexing capability.
  • shaderClipDistance specifies whether clip distances are supported in shader code. If this feature is not enabled, any members decorated with the ClipDistance built-in decoration must not be read from or written to in shader modules. This also specifies whether shader modules can declare the ClipDistance capability.
  • shaderCullDistance specifies whether cull distances are supported in shader code. If this feature is not enabled, any members decorated with the CullDistance built-in decoration must not be read from or written to in shader modules. This also specifies whether shader modules can declare the CullDistance capability.
  • shaderFloat64 specifies whether 64-bit floats (doubles) are supported in shader code. If this feature is not enabled, 64-bit floating-point types must not be used in shader code. This also specifies whether shader modules can declare the Float64 capability.
  • shaderInt64 specifies whether 64-bit integers (signed and unsigned) are supported in shader code. If this feature is not enabled, 64-bit integer types must not be used in shader code. This also specifies whether shader modules can declare the Int64 capability.
  • shaderInt16 specifies whether 16-bit integers (signed and unsigned) are supported in shader code. If this feature is not enabled, 16-bit integer types must not be used in shader code. This also specifies whether shader modules can declare the Int16 capability.
  • shaderResourceResidency specifies whether image operations that return resource residency information are supported in shader code. If this feature is not enabled, the OpImageSparse* instructions must not be used in shader code. This also specifies whether shader modules can declare the SparseResidency capability. The feature requires at least one of the sparseResidency* features to be supported.
  • shaderResourceMinLod specifies whether image operations that specify the minimum resource LOD are supported in shader code. If this feature is not enabled, the MinLod image operand must not be used in shader code. This also specifies whether shader modules can declare the MinLod capability.
  • sparseBinding specifies whether resource memory can be managed at opaque sparse block level instead of at the object level. If this feature is not enabled, resource memory must be bound only on a per-object basis using the vkBindBufferMemory and vkBindImageMemory commands. In this case, buffers and images must not be created with VK_BUFFER_CREATE_SPARSE_BINDING_BIT and VK_IMAGE_CREATE_SPARSE_BINDING_BIT set in the flags member of the VkBufferCreateInfo and VkImageCreateInfo structures, respectively. Otherwise resource memory can be managed as described in Sparse Resource Features.
  • sparseResidencyBuffer specifies whether the device can access partially resident buffers. If this feature is not enabled, buffers must not be created with VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT set in the flags member of the VkBufferCreateInfo structure.
  • sparseResidencyImage2D specifies whether the device can access partially resident 2D images with 1 sample per pixel. If this feature is not enabled, images with an imageType of VK_IMAGE_TYPE_2D and samples set to VK_SAMPLE_COUNT_1_BIT must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the flags member of the VkImageCreateInfo structure.
  • sparseResidencyImage3D specifies whether the device can access partially resident 3D images. If this feature is not enabled, images with an imageType of VK_IMAGE_TYPE_3D must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the flags member of the VkImageCreateInfo structure.
  • sparseResidency2Samples specifies whether the physical device can access partially resident 2D images with 2 samples per pixel. If this feature is not enabled, images with an imageType of VK_IMAGE_TYPE_2D and samples set to VK_SAMPLE_COUNT_2_BIT must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the flags member of the VkImageCreateInfo structure.
  • sparseResidency4Samples specifies whether the physical device can access partially resident 2D images with 4 samples per pixel. If this feature is not enabled, images with an imageType of VK_IMAGE_TYPE_2D and samples set to VK_SAMPLE_COUNT_4_BIT must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the flags member of the VkImageCreateInfo structure.
  • sparseResidency8Samples specifies whether the physical device can access partially resident 2D images with 8 samples per pixel. If this feature is not enabled, images with an imageType of VK_IMAGE_TYPE_2D and samples set to VK_SAMPLE_COUNT_8_BIT must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the flags member of the VkImageCreateInfo structure.
  • sparseResidency16Samples specifies whether the physical device can access partially resident 2D images with 16 samples per pixel. If this feature is not enabled, images with an imageType of VK_IMAGE_TYPE_2D and samples set to VK_SAMPLE_COUNT_16_BIT must not be created with VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT set in the flags member of the VkImageCreateInfo structure.
  • sparseResidencyAliased specifies whether the physical device can correctly access data aliased into multiple locations. If this feature is not enabled, the VK_BUFFER_CREATE_SPARSE_ALIASED_BIT and VK_IMAGE_CREATE_SPARSE_ALIASED_BIT enum values must not be used in flags members of the VkBufferCreateInfo and VkImageCreateInfo structures, respectively.
  • variableMultisampleRate specifies whether all pipelines that will be bound to a command buffer during a subpass with no attachments must have the same value for VkPipelineMultisampleStateCreateInfo::rasterizationSamples. If set to VK_TRUE, the implementation supports variable multisample rates in a subpass with no attachments. If set to VK_FALSE, then all pipelines bound in such a subpass must have the same multisample rate. This has no effect in situations where a subpass uses any attachments.
  • inheritedQueries specifies whether a secondary command buffer may be executed while a query is active.

See Also

VkBool32, VkDeviceCreateInfo, VkPhysicalDeviceFeatures2, vkGetPhysicalDeviceFeatures

Constructors

VkPhysicalDeviceFeatures 

Fields

data VkPhysicalDeviceSparseProperties Source #

VkPhysicalDeviceSparseProperties - Structure specifying physical device sparse memory properties

See Also

VkBool32, VkPhysicalDeviceProperties

Constructors

VkPhysicalDeviceSparseProperties 

Fields

  • vkResidencyStandard2DBlockShape :: VkBool32

    residencyStandard2DBlockShape is VK_TRUE if the physical device will access all single-sample 2D sparse resources using the standard sparse image block shapes (based on image format), as described in the Standard Sparse Image Block Shapes (Single Sample) table. If this property is not supported the value returned in the imageGranularity member of the VkSparseImageFormatProperties structure for single-sample 2D images is not required to match the standard sparse image block dimensions listed in the table.

  • vkResidencyStandard2DMultisampleBlockShape :: VkBool32

    residencyStandard2DMultisampleBlockShape is VK_TRUE if the physical device will access all multisample 2D sparse resources using the standard sparse image block shapes (based on image format), as described in the Standard Sparse Image Block Shapes (MSAA) table. If this property is not supported, the value returned in the imageGranularity member of the VkSparseImageFormatProperties structure for multisample 2D images is not required to match the standard sparse image block dimensions listed in the table.

  • vkResidencyStandard3DBlockShape :: VkBool32

    residencyStandard3DBlockShape is VK_TRUE if the physical device will access all 3D sparse resources using the standard sparse image block shapes (based on image format), as described in the Standard Sparse Image Block Shapes (Single Sample) table. If this property is not supported, the value returned in the imageGranularity member of the VkSparseImageFormatProperties structure for 3D images is not required to match the standard sparse image block dimensions listed in the table.

  • vkResidencyAlignedMipSize :: VkBool32

    residencyAlignedMipSize is VK_TRUE if images with mip level dimensions that are not integer multiples of the corresponding dimensions of the sparse image block may be placed in the mip tail. If this property is not reported, only mip levels with dimensions smaller than the imageGranularity member of the VkSparseImageFormatProperties structure will be placed in the mip tail. If this property is reported the implementation is allowed to return VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT in the flags member of VkSparseImageFormatProperties, indicating that mip level dimensions that are not integer multiples of the corresponding dimensions of the sparse image block will be placed in the mip tail.

  • vkResidencyNonResidentStrict :: VkBool32

    residencyNonResidentStrict specifies whether the physical device can consistently access non-resident regions of a resource. If this property is VK_TRUE, access to non-resident regions of resources will be guaranteed to return values as if the resource were populated with 0; writes to non-resident regions will be discarded.

data VkPhysicalDeviceLimits Source #

VkPhysicalDeviceLimits - Structure reporting implementation-dependent physical device limits

Members

  • maxImageDimension1D is the maximum dimension (width) supported for all images created with an imageType of VK_IMAGE_TYPE_1D.
  • maxImageDimension2D is the maximum dimension (width or height) supported for all images created with an imageType of VK_IMAGE_TYPE_2D and without VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT set in flags.
  • maxImageDimension3D is the maximum dimension (width, height, or depth) supported for all images created with an imageType of VK_IMAGE_TYPE_3D.
  • maxImageDimensionCube is the maximum dimension (width or height) supported for all images created with an imageType of VK_IMAGE_TYPE_2D and with VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT set in flags.
  • maxImageArrayLayers is the maximum number of layers (arrayLayers) for an image.
  • maxTexelBufferElements is the maximum number of addressable texels for a buffer view created on a buffer which was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT set in the usage member of the VkBufferCreateInfo structure.
  • maxUniformBufferRange is the maximum value that can be specified in the range member of any VkDescriptorBufferInfo structures passed to a call to vkUpdateDescriptorSets for descriptors of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC.
  • maxStorageBufferRange is the maximum value that can be specified in the range member of any VkDescriptorBufferInfo structures passed to a call to vkUpdateDescriptorSets for descriptors of type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC.
  • maxPushConstantsSize is the maximum size, in bytes, of the pool of push constant memory. For each of the push constant ranges indicated by the pPushConstantRanges member of the VkPipelineLayoutCreateInfo structure, (offset + size) must be less than or equal to this limit.
  • maxMemoryAllocationCount is the maximum number of device memory allocations, as created by vkAllocateMemory, which can simultaneously exist.
  • maxSamplerAllocationCount is the maximum number of sampler objects, as created by vkCreateSampler, which can simultaneously exist on a device.
  • bufferImageGranularity is the granularity, in bytes, at which buffer or linear image resources, and optimal image resources can be bound to adjacent offsets in the same VkDeviceMemory object without aliasing. See Buffer-Image Granularity for more details.
  • sparseAddressSpaceSize is the total amount of address space available, in bytes, for sparse memory resources. This is an upper bound on the sum of the size of all sparse resources, regardless of whether any memory is bound to them.
  • maxBoundDescriptorSets is the maximum number of descriptor sets that can be simultaneously used by a pipeline. All DescriptorSet decorations in shader modules must have a value less than maxBoundDescriptorSets. See {html_spec_relative}#descriptorsets-sets.
  • maxPerStageDescriptorSamplers is the maximum number of samplers that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type of VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. A descriptor is accessible to a shader stage when the stageFlags member of the VkDescriptorSetLayoutBinding structure has the bit for that shader stage set. See {html_spec_relative}#descriptorsets-sampler and {html_spec_relative}#descriptorsets-combinedimagesampler.
  • maxPerStageDescriptorUniformBuffers is the maximum number of uniform buffers that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. A descriptor is accessible to a shader stage when the stageFlags member of the VkDescriptorSetLayoutBinding structure has the bit for that shader stage set. See {html_spec_relative}#descriptorsets-uniformbuffer and {html_spec_relative}#descriptorsets-uniformbufferdynamic.
  • maxPerStageDescriptorStorageBuffers is the maximum number of storage buffers that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. A descriptor is accessible to a pipeline shader stage when the stageFlags member of the VkDescriptorSetLayoutBinding structure has the bit for that shader stage set. See {html_spec_relative}#descriptorsets-storagebuffer and {html_spec_relative}#descriptorsets-storagebufferdynamic.
  • maxPerStageDescriptorSampledImages is the maximum number of sampled images that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. A descriptor is accessible to a pipeline shader stage when the stageFlags member of the VkDescriptorSetLayoutBinding structure has the bit for that shader stage set. See {html_spec_relative}#descriptorsets-combinedimagesampler, {html_spec_relative}#descriptorsets-sampledimage, and {html_spec_relative}#descriptorsets-uniformtexelbuffer.
  • maxPerStageDescriptorStorageImages is the maximum number of storage images that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. A descriptor is accessible to a pipeline shader stage when the stageFlags member of the VkDescriptorSetLayoutBinding structure has the bit for that shader stage set. See {html_spec_relative}#descriptorsets-storageimage, and {html_spec_relative}#descriptorsets-storagetexelbuffer.
  • maxPerStageDescriptorInputAttachments is the maximum number of input attachments that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. A descriptor is accessible to a pipeline shader stage when the stageFlags member of the VkDescriptorSetLayoutBinding structure has the bit for that shader stage set. These are only supported for the fragment stage. See {html_spec_relative}#descriptorsets-inputattachment.
  • maxPerStageResources is the maximum number of resources that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. For the fragment shader stage the framebuffer color attachments also count against this limit.
  • maxDescriptorSetSamplers is the maximum number of samplers that can be included in descriptor bindings in a pipeline layout across all pipeline shader stages and descriptor set numbers. Descriptors with a type of VK_DESCRIPTOR_TYPE_SAMPLER or VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. See {html_spec_relative}#descriptorsets-sampler and {html_spec_relative}#descriptorsets-combinedimagesampler.
  • maxDescriptorSetUniformBuffers is the maximum number of uniform buffers that can be included in descriptor bindings in a pipeline layout across all pipeline shader stages and descriptor set numbers. Descriptors with a type of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. See {html_spec_relative}#descriptorsets-uniformbuffer and {html_spec_relative}#descriptorsets-uniformbufferdynamic.
  • maxDescriptorSetUniformBuffersDynamic is the maximum number of dynamic uniform buffers that can be included in descriptor bindings in a pipeline layout across all pipeline shader stages and descriptor set numbers. Descriptors with a type of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. See {html_spec_relative}#descriptorsets-uniformbufferdynamic.
  • maxDescriptorSetStorageBuffers is the maximum number of storage buffers that can be included in descriptor bindings in a pipeline layout across all pipeline shader stages and descriptor set numbers. Descriptors with a type of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. See {html_spec_relative}#descriptorsets-storagebuffer and {html_spec_relative}#descriptorsets-storagebufferdynamic.
  • maxDescriptorSetStorageBuffersDynamic is the maximum number of dynamic storage buffers that can be included in descriptor bindings in a pipeline layout across all pipeline shader stages and descriptor set numbers. Descriptors with a type of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. See {html_spec_relative}#descriptorsets-storagebufferdynamic.
  • maxDescriptorSetSampledImages is the maximum number of sampled images that can be included in descriptor bindings in a pipeline layout across all pipeline shader stages and descriptor set numbers. Descriptors with a type of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, or VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. See {html_spec_relative}#descriptorsets-combinedimagesampler, {html_spec_relative}#descriptorsets-sampledimage, and {html_spec_relative}#descriptorsets-uniformtexelbuffer.
  • maxDescriptorSetStorageImages is the maximum number of storage images that can be included in descriptor bindings in a pipeline layout across all pipeline shader stages and descriptor set numbers. Descriptors with a type of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. See {html_spec_relative}#descriptorsets-storageimage, and {html_spec_relative}#descriptorsets-storagetexelbuffer.
  • maxDescriptorSetInputAttachments is the maximum number of input attachments that can be included in descriptor bindings in a pipeline layout across all pipeline shader stages and descriptor set numbers. Descriptors with a type of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT count against this limit. Only descriptors in descriptor set layouts created without the VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT bit set count against this limit. See {html_spec_relative}#descriptorsets-inputattachment.
  • maxVertexInputAttributes is the maximum number of vertex input attributes that can be specified for a graphics pipeline. These are described in the array of VkVertexInputAttributeDescription structures that are provided at graphics pipeline creation time via the pVertexAttributeDescriptions member of the VkPipelineVertexInputStateCreateInfo structure. See {html_spec_relative}#fxvertex-attrib and {html_spec_relative}#fxvertex-input.
  • maxVertexInputBindings is the maximum number of vertex buffers that can be specified for providing vertex attributes to a graphics pipeline. These are described in the array of VkVertexInputBindingDescription structures that are provided at graphics pipeline creation time via the pVertexBindingDescriptions member of the VkPipelineVertexInputStateCreateInfo structure. The binding member of VkVertexInputBindingDescription must be less than this limit. See {html_spec_relative}#fxvertex-input.
  • maxVertexInputAttributeOffset is the maximum vertex input attribute offset that can be added to the vertex input binding stride. The offset member of the VkVertexInputAttributeDescription structure must be less than or equal to this limit. See {html_spec_relative}#fxvertex-input.
  • maxVertexInputBindingStride is the maximum vertex input binding stride that can be specified in a vertex input binding. The stride member of the VkVertexInputBindingDescription structure must be less than or equal to this limit. See {html_spec_relative}#fxvertex-input.
  • maxVertexOutputComponents is the maximum number of components of output variables which can be output by a vertex shader. See {html_spec_relative}#shaders-vertex.
  • maxTessellationGenerationLevel is the maximum tessellation generation level supported by the fixed-function tessellation primitive generator. See {html_spec_relative}#tessellation.
  • maxTessellationPatchSize is the maximum patch size, in vertices, of patches that can be processed by the tessellation control shader and tessellation primitive generator. The patchControlPoints member of the VkPipelineTessellationStateCreateInfo structure specified at pipeline creation time and the value provided in the OutputVertices execution mode of shader modules must be less than or equal to this limit. See {html_spec_relative}#tessellation.
  • maxTessellationControlPerVertexInputComponents is the maximum number of components of input variables which can be provided as per-vertex inputs to the tessellation control shader stage.
  • maxTessellationControlPerVertexOutputComponents is the maximum number of components of per-vertex output variables which can be output from the tessellation control shader stage.
  • maxTessellationControlPerPatchOutputComponents is the maximum number of components of per-patch output variables which can be output from the tessellation control shader stage.
  • maxTessellationControlTotalOutputComponents is the maximum total number of components of per-vertex and per-patch output variables which can be output from the tessellation control shader stage.
  • maxTessellationEvaluationInputComponents is the maximum number of components of input variables which can be provided as per-vertex inputs to the tessellation evaluation shader stage.
  • maxTessellationEvaluationOutputComponents is the maximum number of components of per-vertex output variables which can be output from the tessellation evaluation shader stage.
  • maxGeometryShaderInvocations is the maximum invocation count supported for instanced geometry shaders. The value provided in the Invocations execution mode of shader modules must be less than or equal to this limit. See {html_spec_relative}#geometry.
  • maxGeometryInputComponents is the maximum number of components of input variables which can be provided as inputs to the geometry shader stage.
  • maxGeometryOutputComponents is the maximum number of components of output variables which can be output from the geometry shader stage.
  • maxGeometryOutputVertices is the maximum number of vertices which can be emitted by any geometry shader.
  • maxGeometryTotalOutputComponents is the maximum total number of components of output, across all emitted vertices, which can be output from the geometry shader stage.
  • maxFragmentInputComponents is the maximum number of components of input variables which can be provided as inputs to the fragment shader stage.
  • maxFragmentOutputAttachments is the maximum number of output attachments which can be written to by the fragment shader stage.
  • maxFragmentDualSrcAttachments is the maximum number of output attachments which can be written to by the fragment shader stage when blending is enabled and one of the dual source blend modes is in use. See {html_spec_relative}#framebuffer-dsb and dualSrcBlend.
  • maxFragmentCombinedOutputResources is the total number of storage buffers, storage images, and output buffers which can be used in the fragment shader stage.
  • maxComputeSharedMemorySize is the maximum total storage size, in bytes, of all variables declared with the WorkgroupLocal storage class in shader modules (or with the shared storage qualifier in GLSL) in the compute shader stage.
  • maxComputeWorkGroupCount[3] is the maximum number of local workgroups that can be dispatched by a single dispatch command. These three values represent the maximum number of local workgroups for the X, Y, and Z dimensions, respectively. The workgroup count parameters to the dispatch commands must be less than or equal to the corresponding limit. See {html_spec_relative}#dispatch.
  • maxComputeWorkGroupInvocations is the maximum total number of compute shader invocations in a single local workgroup. The product of the X, Y, and Z sizes as specified by the LocalSize execution mode in shader modules and by the object decorated by the WorkgroupSize decoration must be less than or equal to this limit.
  • maxComputeWorkGroupSize[3] is the maximum size of a local compute workgroup, per dimension. These three values represent the maximum local workgroup size in the X, Y, and Z dimensions, respectively. The x, y, and z sizes specified by the LocalSize execution mode and by the object decorated by the WorkgroupSize decoration in shader modules must be less than or equal to the corresponding limit.
  • subPixelPrecisionBits is the number of bits of subpixel precision in framebuffer coordinates xf and yf. See {html_spec_relative}#primsrast.
  • subTexelPrecisionBits is the number of bits of precision in the division along an axis of an image used for minification and magnification filters. 2subTexelPrecisionBits is the actual number of divisions along each axis of the image represented. Sub-texel values calculated during image sampling will snap to these locations when generating the filtered results.
  • mipmapPrecisionBits is the number of bits of division that the LOD calculation for mipmap fetching get snapped to when determining the contribution from each mip level to the mip filtered results. 2mipmapPrecisionBits is the actual number of divisions.

    Note

    For example, if this value is 2 bits then when linearly filtering between two levels, each level could: contribute: 0%, 33%, 66%, or 100% (this is just an example and the amount of contribution should be covered by different equations in the spec).

  • maxDrawIndexedIndexValue is the maximum index value that can be used for indexed draw calls when using 32-bit indices. This excludes the primitive restart index value of 0xFFFFFFFF. See fullDrawIndexUint32.
  • maxDrawIndirectCount is the maximum draw count that is supported for indirect draw calls. See multiDrawIndirect.
  • maxSamplerLodBias is the maximum absolute sampler LOD bias. The sum of the mipLodBias member of the VkSamplerCreateInfo structure and the Bias operand of image sampling operations in shader modules (or 0 if no Bias operand is provided to an image sampling operation) are clamped to the range [-maxSamplerLodBias,+maxSamplerLodBias]. See {html_spec_relative}#samplers-mipLodBias.
  • maxSamplerAnisotropy is the maximum degree of sampler anisotropy. The maximum degree of anisotropic filtering used for an image sampling operation is the minimum of the maxAnisotropy member of the VkSamplerCreateInfo structure and this limit. See {html_spec_relative}#samplers-maxAnisotropy.
  • maxViewports is the maximum number of active viewports. The viewportCount member of the VkPipelineViewportStateCreateInfo structure that is provided at pipeline creation must be less than or equal to this limit.
  • maxViewportDimensions[2] are the maximum viewport dimensions in the X (width) and Y (height) dimensions, respectively. The maximum viewport dimensions must be greater than or equal to the largest image which can be created and used as a framebuffer attachment. See Controlling the Viewport.
  • viewportBoundsRange[2] is the [minimum, maximum] range that the corners of a viewport must be contained in. This range must be at least [-2 × size, 2 × size - 1], where size = max(maxViewportDimensions[0], maxViewportDimensions[1]). See Controlling the Viewport.

    Note

    The intent of the viewportBoundsRange limit is to allow a maximum sized viewport to be arbitrarily shifted relative to the output target as long as at least some portion intersects. This would give a bounds limit of [-size + 1, 2 × size - 1] which would allow all possible non-empty-set intersections of the output target and the viewport. Since these numbers are typically powers of two, picking the signed number range using the smallest possible number of bits ends up with the specified range.

  • viewportSubPixelBits is the number of bits of subpixel precision for viewport bounds. The subpixel precision that floating-point viewport bounds are interpreted at is given by this limit.
  • minMemoryMapAlignment is the minimum required alignment, in bytes, of host visible memory allocations within the host address space. When mapping a memory allocation with vkMapMemory, subtracting offset bytes from the returned pointer will always produce an integer multiple of this limit. See {html_spec_relative}#memory-device-hostaccess.
  • minTexelBufferOffsetAlignment is the minimum required alignment, in bytes, for the offset member of the VkBufferViewCreateInfo structure for texel buffers. When a buffer view is created for a buffer which was created with VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT set in the usage member of the VkBufferCreateInfo structure, the offset must be an integer multiple of this limit.
  • minUniformBufferOffsetAlignment is the minimum required alignment, in bytes, for the offset member of the VkDescriptorBufferInfo structure for uniform buffers. When a descriptor of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER or VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC is updated, the offset must be an integer multiple of this limit. Similarly, dynamic offsets for uniform buffers must be multiples of this limit.
  • minStorageBufferOffsetAlignment is the minimum required alignment, in bytes, for the offset member of the VkDescriptorBufferInfo structure for storage buffers. When a descriptor of type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC is updated, the offset must be an integer multiple of this limit. Similarly, dynamic offsets for storage buffers must be multiples of this limit.
  • minTexelOffset is the minimum offset value for the ConstOffset image operand of any of the OpImageSample* or OpImageFetch* image instructions.
  • maxTexelOffset is the maximum offset value for the ConstOffset image operand of any of the OpImageSample* or OpImageFetch* image instructions.
  • minTexelGatherOffset is the minimum offset value for the Offset or ConstOffsets image operands of any of the OpImage*Gather image instructions.
  • maxTexelGatherOffset is the maximum offset value for the Offset or ConstOffsets image operands of any of the OpImage*Gather image instructions.
  • minInterpolationOffset is the minimum negative offset value for the offset operand of the InterpolateAtOffset extended instruction.
  • maxInterpolationOffset is the maximum positive offset value for the offset operand of the InterpolateAtOffset extended instruction.
  • subPixelInterpolationOffsetBits is the number of subpixel fractional bits that the x and y offsets to the InterpolateAtOffset extended instruction may be rounded to as fixed-point values.
  • maxFramebufferWidth is the maximum width for a framebuffer. The width member of the VkFramebufferCreateInfo structure must be less than or equal to this limit.
  • maxFramebufferHeight is the maximum height for a framebuffer. The height member of the VkFramebufferCreateInfo structure must be less than or equal to this limit.
  • maxFramebufferLayers is the maximum layer count for a layered framebuffer. The layers member of the VkFramebufferCreateInfo structure must be less than or equal to this limit.
  • framebufferColorSampleCounts is a bitmask1 of VkSampleCountFlagBits indicating the color sample counts that are supported for all framebuffer color attachments with floating- or fixed-point formats. There is no limit that specifies the color sample counts that are supported for all color attachments with integer formats.
  • framebufferDepthSampleCounts is a bitmask1 of VkSampleCountFlagBits indicating the supported depth sample counts for all framebuffer depth/stencil attachments, when the format includes a depth component.
  • framebufferStencilSampleCounts is a bitmask1 of VkSampleCountFlagBits indicating the supported stencil sample counts for all framebuffer depth/stencil attachments, when the format includes a stencil component.
  • framebufferNoAttachmentsSampleCounts is a bitmask1 of VkSampleCountFlagBits indicating the supported sample counts for a framebuffer with no attachments.
  • maxColorAttachments is the maximum number of color attachments that can be used by a subpass in a render pass. The colorAttachmentCount member of the VkSubpassDescription structure must be less than or equal to this limit.
  • sampledImageColorSampleCounts is a bitmask1 of VkSampleCountFlagBits indicating the sample counts supported for all 2D images created with VK_IMAGE_TILING_OPTIMAL, usage containing VK_IMAGE_USAGE_SAMPLED_BIT, and a non-integer color format.
  • sampledImageIntegerSampleCounts is a bitmask1 of VkSampleCountFlagBits indicating the sample counts supported for all 2D images created with VK_IMAGE_TILING_OPTIMAL, usage containing VK_IMAGE_USAGE_SAMPLED_BIT, and an integer color format.
  • sampledImageDepthSampleCounts is a bitmask1 of VkSampleCountFlagBits indicating the sample counts supported for all 2D images created with VK_IMAGE_TILING_OPTIMAL, usage containing VK_IMAGE_USAGE_SAMPLED_BIT, and a depth format.
  • sampledImageStencilSampleCounts is a bitmask1 of VkSampleCountFlagBits indicating the sample supported for all 2D images created with VK_IMAGE_TILING_OPTIMAL, usage containing VK_IMAGE_USAGE_SAMPLED_BIT, and a stencil format.
  • storageImageSampleCounts is a bitmask1 of VkSampleCountFlagBits indicating the sample counts supported for all 2D images created with VK_IMAGE_TILING_OPTIMAL, and usage containing VK_IMAGE_USAGE_STORAGE_BIT.
  • maxSampleMaskWords is the maximum number of array elements of a variable decorated with the SampleMask built-in decoration.
  • timestampComputeAndGraphics specifies support for timestamps on all graphics and compute queues. If this limit is set to VK_TRUE, all queues that advertise the VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT in the VkQueueFamilyProperties::queueFlags support VkQueueFamilyProperties::timestampValidBits of at least 36. See Timestamp Queries.
  • timestampPeriod is the number of nanoseconds required for a timestamp query to be incremented by 1. See Timestamp Queries.
  • maxClipDistances is the maximum number of clip distances that can be used in a single shader stage. The size of any array declared with the ClipDistance built-in decoration in a shader module must be less than or equal to this limit.
  • maxCullDistances is the maximum number of cull distances that can be used in a single shader stage. The size of any array declared with the CullDistance built-in decoration in a shader module must be less than or equal to this limit.
  • maxCombinedClipAndCullDistances is the maximum combined number of clip and cull distances that can be used in a single shader stage. The sum of the sizes of any pair of arrays declared with the ClipDistance and CullDistance built-in decoration used by a single shader stage in a shader module must be less than or equal to this limit.
  • discreteQueuePriorities is the number of discrete priorities that can be assigned to a queue based on the value of each member of VkDeviceQueueCreateInfo::pQueuePriorities. This must be at least 2, and levels must be spread evenly over the range, with at least one level at 1.0, and another at 0.0. See {html_spec_relative}#devsandqueues-priority.
  • pointSizeRange[2] is the range [minimum,maximum] of supported sizes for points. Values written to variables decorated with the PointSize built-in decoration are clamped to this range.
  • lineWidthRange[2] is the range [minimum,maximum] of supported widths for lines. Values specified by the lineWidth member of the VkPipelineRasterizationStateCreateInfo or the lineWidth parameter to vkCmdSetLineWidth are clamped to this range.
  • pointSizeGranularity is the granularity of supported point sizes. Not all point sizes in the range defined by pointSizeRange are supported. This limit specifies the granularity (or increment) between successive supported point sizes.
  • lineWidthGranularity is the granularity of supported line widths. Not all line widths in the range defined by lineWidthRange are supported. This limit specifies the granularity (or increment) between successive supported line widths.
  • strictLines specifies whether lines are rasterized according to the preferred method of rasterization. If set to VK_FALSE, lines may be rasterized under a relaxed set of rules. If set to VK_TRUE, lines are rasterized as per the strict definition. See Basic Line Segment Rasterization.
  • standardSampleLocations specifies whether rasterization uses the standard sample locations as documented in Multisampling. If set to VK_TRUE, the implementation uses the documented sample locations. If set to VK_FALSE, the implementation may use different sample locations.
  • optimalBufferCopyOffsetAlignment is the optimal buffer offset alignment in bytes for vkCmdCopyBufferToImage and vkCmdCopyImageToBuffer. The per texel alignment requirements are enforced, but applications should use the optimal alignment for optimal performance and power use.
  • optimalBufferCopyRowPitchAlignment is the optimal buffer row pitch alignment in bytes for vkCmdCopyBufferToImage and vkCmdCopyImageToBuffer. Row pitch is the number of bytes between texels with the same X coordinate in adjacent rows (Y coordinates differ by one). The per texel alignment requirements are enforced, but applications should use the optimal alignment for optimal performance and power use.
  • nonCoherentAtomSize is the size and alignment in bytes that bounds concurrent access to host-mapped device memory.
  • VkPhysicalDeviceDiscardRectanglePropertiesEXT::maxDiscardRectangles is the maximum number of active discard rectangles. This limit can be queried by setting the pNext pointer from a VkPhysicalDeviceProperties2 object to an instance of VkPhysicalDeviceDiscardRectanglePropertiesEXT and using vkGetPhysicalDeviceProperties2 to fill out the members.
  • VkPhysicalDevicePointClippingProperties::pointClippingBehavior defines the clipping behavior of points. This limit can be queried by setting the pNext pointer from a VkPhysicalDeviceProperties2 object to an instance of VkPhysicalDevicePointClippingProperties and using vkGetPhysicalDeviceProperties2 to fill out the members.
  • VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT::maxVertexAttribDivisor is the maximum value of the number of instances that will repeat the value of vertex attribute data when instanced rendering is enabled. This limit can be queried by setting the pNext pointer from a VkPhysicalDeviceProperties2 object to an instance of VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT and using vkGetPhysicalDeviceProperties2 to fill out the members.

Description

1
For all bitmasks of VkSampleCountFlagBits, the sample count limits defined above represent the minimum supported sample counts for each image type. Individual images may support additional sample counts, which are queried using vkGetPhysicalDeviceImageFormatProperties as described in Supported Sample Counts.

See Also

VkBool32, VkDeviceSize, VkPhysicalDeviceProperties, VkSampleCountFlags

Constructors

VkPhysicalDeviceLimits 

Fields

type VkQueueFlags = VkQueueFlagBits Source #

VkQueueFlags - Bitmask of VkQueueFlagBits

Description

VkQueueFlags is a bitmask type for setting a mask of zero or more VkQueueFlagBits.

See Also

VkQueueFamilyProperties, VkQueueFlagBits

type VkMemoryPropertyFlags = VkMemoryPropertyFlagBits Source #

VkMemoryPropertyFlags - Bitmask of VkMemoryPropertyFlagBits

Description

VkMemoryPropertyFlags is a bitmask type for setting a mask of zero or more VkMemoryPropertyFlagBits.

See Also

VkMemoryPropertyFlagBits, VkMemoryType

type VkMemoryHeapFlags = VkMemoryHeapFlagBits Source #

VkMemoryHeapFlags - Bitmask of VkMemoryHeapFlagBits

Description

VkMemoryHeapFlags is a bitmask type for setting a mask of zero or more VkMemoryHeapFlagBits.

See Also

VkMemoryHeap, VkMemoryHeapFlagBits

type VkImageCreateFlags = VkImageCreateFlagBits Source #

VkImageCreateFlags - Bitmask of VkImageCreateFlagBits

Description

VkImageCreateFlags is a bitmask type for setting a mask of zero or more VkImageCreateFlagBits.

See Also

VkImageCreateFlagBits, VkImageCreateInfo, VkPhysicalDeviceImageFormatInfo2, vkGetPhysicalDeviceExternalImageFormatPropertiesNV, vkGetPhysicalDeviceImageFormatProperties

type VkFormatFeatureFlags = VkFormatFeatureFlagBits Source #

VkFormatFeatureFlags - Bitmask of VkFormatFeatureFlagBits

Description

VkFormatFeatureFlags is a bitmask type for setting a mask of zero or more VkFormatFeatureFlagBits.

See Also

VkAndroidHardwareBufferFormatPropertiesANDROID, VkFormatFeatureFlagBits, VkFormatProperties

type VkSampleCountFlags = VkSampleCountFlagBits Source #

VkSampleCountFlags - Bitmask of VkSampleCountFlagBits

Description

VkSampleCountFlags is a bitmask type for setting a mask of zero or more VkSampleCountFlagBits.

See Also

VkImageFormatProperties, VkPhysicalDeviceLimits, VkPhysicalDeviceSampleLocationsPropertiesEXT, VkSampleCountFlagBits