<buffer> reference in <pipeline> (//pfx/pipeline/buffer)

<buffer> specifies a buffer that will be present in the specific binding point.

This specifies a buffer that will be present in the specific binding point. The buffer may be bound as uniform, storage, dynamic uniform, or dynamic storage buffers.

Uniform buffers are read-only, while storage buffers are read/write. Dynamic versions will be created by the implementation in such a way and scope that different parts of them will be bound when rendering different parts of the code.

When a buffer is referenced in such a way from a pipeline, all the entries in its definition get exported by the pipeline by their semantics, if semantics are defined for them, so that the implementation may update them based on these semantics.

XML Attributes (<uniform> element)

ATTRIBUTE

Description

name

The value of the name attribute of a <buffer> element. This is the buffer that this element refers to.

semantic

(OPTIONAL) specifies an application-defined semantic for the entire buffer (as opposed to each variable of its contents). This will be used to access the entire buffer’s block of data.

set

The descriptor set index the buffer binding to this pipeline belongs to. Must be 0 or not defined on implementations that do not support descriptor sets.

binding

The descriptor set binding point or the indexed buffer binding point that will be used for this buffer.

type

The type of reference that this will be.

Possible values:

  • uniform - A uniform buffer object
  • storage - A shader storage buffer object
  • uniformDynamic, dynamicUniform – A uniform buffer object with dynamic offsets.
  • storageDynamic, dynamicStorage – A shader storage buffer object with dynamic offsets.

scope

(OPTIONAL) A string describing the scope, the rate of update of the contents of this buffer.

Valid values:
  • effect (set once per effect)
  • pipeline (set once per pipeline)
  • model (set once per model)
  • node (set once per node)
  • batch (set once per batch).

apiVersion

(OPTIONAL) A string describing which API versions this element will be active for. If omitted, always active.