// Copyright 2021-2024 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}VK_FUCHSIA_buffer_collection.adoc[]

=== 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.

include::{generated}/interfaces/VK_FUCHSIA_buffer_collection.adoc[]

=== Issues

1) When configuring a slink:VkImageConstraintsInfoFUCHSIA structure for
constraint setting, should a NULL pname:pFormatConstraints parameter be
allowed ?

*RESOLVED*: No.
Specifying a NULL pname:pFormatConstraints results in logical complexity of
interpreting the relationship between the
slink:VkImageCreateInfo::pname:usage settings of the elements of the
pname:pImageCreateInfos array and the implied or desired
tlink:VkFormatFeatureFlags.

The explicit requirement for pname: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
