HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_FUCHSIA_buffer_collection

Name

VK_FUCHSIA_buffer_collection - device extension

VK_FUCHSIA_buffer_collection

Name String

VK_FUCHSIA_buffer_collection

Extension Type

Device extension

Registered Extension Number

367

Revision

2

Ratification Status

Not ratified

Extension and Version Dependencies

VK_FUCHSIA_external_memory

and

VK_KHR_sampler_ycbcr_conversion      or

Vulkan Version 1.1

API Interactions
  • Interacts with VK_EXT_debug_report

Contact

Other Extension Metadata

Last Modified Date

2021-09-23

IP Status

No known IP claims.

Contributors
  • Craig Stout, Google

  • John Bauman, Google

  • John Rosasco, Google

Description

A buffer collection is a collection of one or more buffers which were allocated together as a group and which all have the same properties. These properties describe the buffers' internal representation such as its dimensions and memory layout. This ensures that all of the buffers can be used interchangeably by tasks that require swapping among multiple buffers, such as double-buffered graphics rendering.

By sharing such a collection of buffers between components, communication about buffer lifecycle can be made much simpler and more efficient. For example, when a content producer finishes writing to a buffer, it can message the consumer of the buffer with the buffer index, rather than passing a handle to the shared memory.

On Fuchsia, the Sysmem service uses buffer collections as a core construct in its design. VK_FUCHSIA_buffer_collection is the Vulkan extension that allows Vulkan applications to interoperate with the Sysmem service on Fuchsia.

New Object Types

New Commands

New Structures

New Enums

New Bitmasks

New Enum Constants

If VK_EXT_debug_report is supported:

Issues

1) When configuring a ImageConstraintsInfoFUCHSIA structure for constraint setting, should a NULL pFormatConstraints parameter be allowed ?

RESOLVED: No. Specifying a NULL pFormatConstraints results in logical complexity of interpreting the relationship between the ImageCreateInfo::usage settings of the elements of the pImageCreateInfos array and the implied or desired FormatFeatureFlags.

The explicit requirement for pFormatConstraints to be non-NULL simplifies the implied logic of the implementation and expectations for the Vulkan application.

Version History

  • Revision 2, 2021-09-23 (John Rosasco)

    • Review passes

  • Revision 1, 2021-03-09 (John Rosasco)

    • Initial revision

See Also

No cross-references are available

Document Notes

For more information, see the Vulkan Specification.

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

  • 18 types
  • 6 values
  • Packagevulkan-3.27
  • Exports72
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_FUCHSIA_buffer_collection.hs
valuecreateBufferCollectionFUCHSIA
  1. :: MonadIO io
  2. => Device

    device is the logical device that creates the BufferCollectionFUCHSIA

  3. -> BufferCollectionCreateInfoFUCHSIA

    pCreateInfo is a pointer to a BufferCollectionCreateInfoFUCHSIA structure containing parameters affecting creation of the buffer collection

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator is a pointer to a AllocationCallbacks structure controlling host memory allocation as described in the Memory Allocation chapter

  5. -> io BufferCollectionFUCHSIA
#

vkCreateBufferCollectionFUCHSIA - Create a new buffer collection

Valid Usage (Implicit)

  • device must be a valid Device handle

Return Codes

Success
Failure

Host Access

All functions referencing a BufferCollectionFUCHSIA must be externally synchronized with the exception of createBufferCollectionFUCHSIA.

See Also

VK_FUCHSIA_buffer_collection, AllocationCallbacks, BufferCollectionCreateInfoFUCHSIA, BufferCollectionFUCHSIA, Device

A convenience wrapper to make a compatible pair of calls to createBufferCollectionFUCHSIA and destroyBufferCollectionFUCHSIA

To ensure that destroyBufferCollectionFUCHSIA is always called: pass bracket (or the allocate function from your favourite resource management library) as the last argument. To just extract the pair pass (,) as the last argument.

valuesetBufferCollectionBufferConstraintsFUCHSIA
  1. :: MonadIO io
  2. => Device

    device is the logical device

    device must be a valid Device handle

  3. -> BufferCollectionFUCHSIA

    collection is the BufferCollectionFUCHSIA handle

    collection must be a valid BufferCollectionFUCHSIA handle

    collection must have been created, allocated, or retrieved from device

  4. -> BufferConstraintsInfoFUCHSIA

    pBufferConstraintsInfo is a pointer to a BufferConstraintsInfoFUCHSIA structure

    pBufferConstraintsInfo must be a valid pointer to a valid BufferConstraintsInfoFUCHSIA structure

  5. -> io ()
#

vkSetBufferCollectionBufferConstraintsFUCHSIA - Set buffer-based constraints for a buffer collection

Description

setBufferCollectionBufferConstraintsFUCHSIA may fail if the implementation does not support the constraints specified in the bufferCollectionConstraints structure. If that occurs, setBufferCollectionBufferConstraintsFUCHSIA will return ERROR_FORMAT_NOT_SUPPORTED.

Return Codes

Success
Failure

See Also

VK_FUCHSIA_buffer_collection, BufferCollectionFUCHSIA, BufferConstraintsInfoFUCHSIA, Device

valuesetBufferCollectionImageConstraintsFUCHSIA
  1. :: MonadIO io
  2. => Device

    device is the logical device

    device must be a valid Device handle

  3. -> BufferCollectionFUCHSIA

    collection is the BufferCollectionFUCHSIA handle

    collection must be a valid BufferCollectionFUCHSIA handle

    collection must have been created, allocated, or retrieved from device

  4. -> ImageConstraintsInfoFUCHSIA

    pImageConstraintsInfo is a pointer to a ImageConstraintsInfoFUCHSIA structure

    pImageConstraintsInfo must be a valid pointer to a valid ImageConstraintsInfoFUCHSIA structure

  5. -> io ()
#

vkSetBufferCollectionImageConstraintsFUCHSIA - Set image-based constraints for a buffer collection

Description

setBufferCollectionImageConstraintsFUCHSIA may fail if pImageConstraintsInfo->formatConstraintsCount is larger than the implementation-defined limit. If that occurs, setBufferCollectionImageConstraintsFUCHSIA will return ERROR_INITIALIZATION_FAILED.

setBufferCollectionImageConstraintsFUCHSIA may fail if the implementation does not support any of the formats described by the pImageConstraintsInfo structure. If that occurs, setBufferCollectionImageConstraintsFUCHSIA will return ERROR_FORMAT_NOT_SUPPORTED.

Return Codes

Success
Failure

See Also

VK_FUCHSIA_buffer_collection, BufferCollectionFUCHSIA, Device, ImageConstraintsInfoFUCHSIA

valuedestroyBufferCollectionFUCHSIA
  1. :: MonadIO io
  2. => Device

    device is the logical device that creates the BufferCollectionFUCHSIA

  3. -> BufferCollectionFUCHSIA

    collection is the BufferCollectionFUCHSIA handle

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator is a pointer to a AllocationCallbacks structure controlling host memory allocation as described in the Memory Allocation chapter

  5. -> io ()
#

vkDestroyBufferCollectionFUCHSIA - Destroy a buffer collection

Valid Usage

Valid Usage (Implicit)

  • device must be a valid Device handle

  • collection must be a valid BufferCollectionFUCHSIA handle

  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure

  • collection must have been created, allocated, or retrieved from device

See Also

VK_FUCHSIA_buffer_collection, AllocationCallbacks, BufferCollectionFUCHSIA, Device

valuegetBufferCollectionPropertiesFUCHSIA
  1. :: MonadIO io
  2. => Device

    device is the logical device handle

  3. -> BufferCollectionFUCHSIA

    collection is the BufferCollectionFUCHSIA handle

  4. -> io BufferCollectionPropertiesFUCHSIA
#

vkGetBufferCollectionPropertiesFUCHSIA - Retrieve properties from a buffer collection

Description

For image-based buffer collections, upon calling getBufferCollectionPropertiesFUCHSIA, Sysmem will choose an element of the ImageConstraintsInfoFUCHSIA::pImageCreateInfos established by the preceding call to setBufferCollectionImageConstraintsFUCHSIA. The index of the element chosen is stored in and can be retrieved from BufferCollectionPropertiesFUCHSIA::createInfoIndex.

For buffer-based buffer collections, a single BufferCreateInfo is specified as BufferConstraintsInfoFUCHSIA::createInfo. BufferCollectionPropertiesFUCHSIA::createInfoIndex will therefore always be zero.

getBufferCollectionPropertiesFUCHSIA may fail if Sysmem is unable to resolve the constraints of all of the participants in the buffer collection. If that occurs, getBufferCollectionPropertiesFUCHSIA will return ERROR_INITIALIZATION_FAILED.

Valid Usage

Valid Usage (Implicit)

  • device must be a valid Device handle

Return Codes

Success
Failure

See Also

VK_FUCHSIA_buffer_collection, BufferCollectionFUCHSIA, BufferCollectionPropertiesFUCHSIA, Device

VkImportMemoryBufferCollectionFUCHSIA - Structure to specify the Sysmem buffer to import

Structure Chaining

Extends the structure

See Also

VK_FUCHSIA_buffer_collection, BufferCollectionFUCHSIA, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkBufferCollectionImageCreateInfoFUCHSIA - Create a VkBufferCollectionFUCHSIA-compatible VkImage

Structure Chaining

Extends the structure

See Also

VK_FUCHSIA_buffer_collection, BufferCollectionFUCHSIA, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkBufferCollectionBufferCreateInfoFUCHSIA - Create a VkBufferCollectionFUCHSIA-compatible VkBuffer

Structure Chaining

Extends the structure

See Also

VK_FUCHSIA_buffer_collection, BufferCollectionFUCHSIA, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkBufferCollectionCreateInfoFUCHSIA - Structure specifying desired parameters to create the buffer collection

Valid Usage (Implicit)

See Also

VK_FUCHSIA_buffer_collection, StructureType, createBufferCollectionFUCHSIA

Constructors

  • BufferCollectionCreateInfoFUCHSIA
    • collectionToken :: Zx_handle_t

      collectionToken is a zx_handle_t containing the Sysmem client’s buffer collection token

      collectionToken must be a valid zx_handle_t to a Zircon channel allocated from Sysmem (fuchsia.sysmem.Allocator/AllocateSharedCollection) with ZX_DEFAULT_CHANNEL_RIGHTS rights

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkBufferCollectionPropertiesFUCHSIA - Structure specifying the negotiated format chosen by Sysmem

Description

sysmemColorSpace is only set for image-based buffer collections where the constraints were specified using ImageConstraintsInfoFUCHSIA in a call to setBufferCollectionImageConstraintsFUCHSIA.

For image-based buffer collections, createInfoIndex will identify both the ImageConstraintsInfoFUCHSIA::pImageCreateInfos element and the ImageConstraintsInfoFUCHSIA::pFormatConstraints element chosen by Sysmem when setBufferCollectionImageConstraintsFUCHSIA was called. The value of sysmemColorSpaceIndex will be an index to one of the color spaces provided in the ImageFormatConstraintsInfoFUCHSIA::pColorSpaces array.

The implementation must have formatFeatures with all bits set that were set in ImageFormatConstraintsInfoFUCHSIA::requiredFormatFeatures, by the call to setBufferCollectionImageConstraintsFUCHSIA, at createInfoIndex (other bits could be set as well).

Valid Usage (Implicit)

See Also

VK_FUCHSIA_buffer_collection, ChromaLocation, ComponentMapping, FormatFeatureFlags, SamplerYcbcrModelConversion, SamplerYcbcrRange, StructureType, SysmemColorSpaceFUCHSIA, getBufferCollectionPropertiesFUCHSIA

Constructors

Instances5Show, Storable, FromCStruct, ToCStruct, Zero

VkBufferConstraintsInfoFUCHSIA - Structure buffer-based buffer collection constraints

Valid Usage

Valid Usage (Implicit)

See Also

VK_FUCHSIA_buffer_collection, BufferCollectionConstraintsInfoFUCHSIA, BufferCreateInfo, FormatFeatureFlags, StructureType, setBufferCollectionBufferConstraintsFUCHSIA

Constructors

Instances4Show, FromCStruct, ToCStruct, Zero

VkSysmemColorSpaceFUCHSIA - Structure describing the buffer collections color space

Valid Usage (Implicit)

See Also

VK_FUCHSIA_buffer_collection, BufferCollectionPropertiesFUCHSIA, ImageFormatConstraintsInfoFUCHSIA, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkImageFormatConstraintsInfoFUCHSIA - Structure image-based buffer collection constraints

Valid Usage (Implicit)

See Also

VK_FUCHSIA_buffer_collection, FormatFeatureFlags, ImageConstraintsInfoFUCHSIA, ImageCreateInfo, ImageFormatConstraintsFlagsFUCHSIA, StructureType, SysmemColorSpaceFUCHSIA

Constructors

Instances4Show, FromCStruct, ToCStruct, Zero

VkImageConstraintsInfoFUCHSIA - Structure of image-based buffer collection constraints

Valid Usage

Valid Usage (Implicit)

See Also

VK_FUCHSIA_buffer_collection, BufferCollectionConstraintsInfoFUCHSIA, ImageConstraintsInfoFlagsFUCHSIA, ImageFormatConstraintsInfoFUCHSIA, StructureType, setBufferCollectionImageConstraintsFUCHSIA

Constructors

Instances4Show, FromCStruct, ToCStruct, Zero

VkBufferCollectionConstraintsInfoFUCHSIA - Structure of general buffer collection constraints

Description

Sysmem uses all buffer count parameters in combination to determine the number of buffers it will allocate. Sysmem defines buffer count constraints in fuchsia.sysmem/constraints.fidl.

Camping as referred to by minBufferCountForCamping, is the number of buffers that should be available for the participant that are not for transient use. This number of buffers is required for the participant to logically operate.

Slack as referred to by minBufferCountForDedicatedSlack and minBufferCountForSharedSlack, refers to the number of buffers desired by participants for optimal performance. minBufferCountForDedicatedSlack refers to the current participant. minBufferCountForSharedSlack refers to buffer slack for all participants in the collection.

Valid Usage (Implicit)

See Also

VK_FUCHSIA_buffer_collection, BufferConstraintsInfoFUCHSIA, ImageConstraintsInfoFUCHSIA, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkImageFormatConstraintsFlagsFUCHSIA - Reserved for future use

Description

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

See Also

VK_FUCHSIA_buffer_collection, Flags, ImageFormatConstraintsInfoFUCHSIA

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …

VkImageConstraintsInfoFlagBitsFUCHSIA - Bitmask specifying image constraints flags

Description

General hints about the type of memory that should be allocated by Sysmem based on the expected usage of the images in the buffer collection include:

For protected memory:

Note that if all participants in the buffer collection (Vulkan or otherwise) specify that protected memory is optional, Sysmem will not allocate protected memory.

See Also

VK_FUCHSIA_buffer_collection, ImageConstraintsInfoFlagsFUCHSIA

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …
newtypenewtype BufferCollectionFUCHSIA
#
Instances7Eq, Ord, Show, Storable, HasObjectType, IsHandle, …
newtypenewtype DebugReportObjectTypeEXT
#

VkDebugReportObjectTypeEXT - Specify the type of an object handle

Description

'

DebugReportObjectTypeEXT

Vulkan Handle Type

DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT

Unknown/Undefined Handle

DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT

Instance

DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT

PhysicalDevice

DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT

Device

DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT

Queue

DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT

Semaphore

DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT

CommandBuffer

DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT

Fence

DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT

DeviceMemory

DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT

Buffer

DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT

Image

DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT

Event

DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT

QueryPool

DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT

BufferView

DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT

ImageView

DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT

ShaderModule

DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT

PipelineCache

DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT

PipelineLayout

DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT

RenderPass

DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT

Pipeline

DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT

DescriptorSetLayout

DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT

Sampler

DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT

DescriptorPool

DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT

DescriptorSet

DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT

Framebuffer

DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT

CommandPool

DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT

SurfaceKHR

DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT

SwapchainKHR

DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT

DebugReportCallbackEXT

DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT

DisplayKHR

DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT

DisplayModeKHR

DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT

DescriptorUpdateTemplate

DebugReportObjectTypeEXT and Vulkan Handle Relationship

The primary expected use of ERROR_VALIDATION_FAILED_EXT is for validation layer testing to prevent invalid commands from reaching the ICD. It is not expected that an application would see this error code during normal use of the validation layers. If an application returns TRUE in DebugUtilsMessengerCallbackDataEXT, the validation layers will return this error code instead of passing the command down the dispatch chain.

See Also

PFN_vkDebugReportCallbackEXT, VK_EXT_debug_marker, VK_EXT_debug_report, DebugMarkerObjectNameInfoEXT, DebugMarkerObjectTagInfoEXT, debugReportMessageEXT

Instances6Eq, Ord, Read, Show, Storable, Zero