4#ifndef GREM_GRAPHICS_BUFFERS_HPP
5#define GREM_GRAPHICS_BUFFERS_HPP
33struct TextureImplementation;
35struct UniformBufferImplementation;
36struct StorageBufferImplementation;
37struct BufferSetImplementation;
38struct InstanceBufferImplementation;
39struct DrawCommandBufferImplementation;
40struct UnorderedDrawCommandBufferImplementation;
45class StorageBufferBase;
47class UniformBufferBase {
57 [[nodiscard]] SharedPointer<UniformBufferImplementation> lock()
const {
59 return implementation;
70 [[nodiscard]] UniformBufferImplementation* get() noexcept {
71 return implementation.get();
82 [[nodiscard]]
const UniformBufferImplementation* get() const noexcept {
83 return implementation.get();
87 GREM_API(graphics) UniformBufferBase(Device& device, BufferLayoutReference bufferLayout,
size_t bufferSize,
size_t textureParameterCount);
92 GREM_API(graphics)
void flush()
const;
95 friend BufferSetImplementation;
97 friend StorageBufferBase;
99 SharedPointer<UniformBufferImplementation> implementation{};
102class StorageBufferBase {
112 [[nodiscard]] SharedPointer<StorageBufferImplementation> lock()
const {
114 return implementation;
125 [[nodiscard]] StorageBufferImplementation* get() noexcept {
126 return implementation.get();
137 [[nodiscard]]
const StorageBufferImplementation* get() const noexcept {
138 return implementation.get();
142 GREM_API(graphics) StorageBufferBase(Device& device, BufferLayoutReference bufferLayout,
size_t elementSize);
145 GREM_API(graphics)
void write(uint32_t elementOffset,
StridedSpan<const byte> elementsData,
size_t elementSize);
146 GREM_API(graphics)
void flush()
const;
149 friend BufferSetImplementation;
150 friend BufferSetBase;
151 friend UniformBufferBase;
153 SharedPointer<StorageBufferImplementation> implementation{};
166 [[nodiscard]] SharedPointer<BufferSetImplementation> lock()
const {
168 return implementation;
179 [[nodiscard]] BufferSetImplementation* get() noexcept {
180 return implementation.get();
191 [[nodiscard]]
const BufferSetImplementation* get() const noexcept {
192 return implementation.get();
196 GREM_API(graphics) BufferSetBase(Device& device, BufferLayoutReference bufferSetLayout, Allocation<SharedPointer<void>> buffers);
198 GREM_API(graphics)
void setBuffer(
size_t bufferIndex, SharedPointer<void> newBuffer);
199 GREM_API(graphics)
void setBuffers(
Span<SharedPointer<void>> newBuffers);
202 void uploadToUniformBuffer(
size_t bufferIndex, Span<const byte> newParameterValuesBytes,
Span<SharedPointer<TextureImplementation>> newTextures,
209 void writeToStorageBuffer(
size_t bufferIndex, uint32_t elementOffset,
StridedSpan<const byte> elementsData,
size_t elementSize);
211 GREM_API(graphics)
void flush()
const;
213 [[nodiscard]]
static SharedPointer<void> getBufferHandle(
const UniformBufferBase& uniformBuffer) {
214 return uniformBuffer.implementation;
217 [[nodiscard]]
static SharedPointer<void> getBufferHandle(
const StorageBufferBase& storageBuffer) {
218 return storageBuffer.implementation;
222 friend UniformBufferBase;
223 friend StorageBufferBase;
225 SharedPointer<BufferSetImplementation> implementation{};
228class InstanceBufferBase {
238 GREM_API(graphics)
void clear();
245 [[nodiscard]] GREM_API(graphics) uint32_t size() const noexcept;
252 [[nodiscard]]
bool empty() const noexcept {
264 [[nodiscard]] SharedPointer<InstanceBufferImplementation> lock()
const {
266 return implementation;
277 [[nodiscard]] InstanceBufferImplementation* get() const noexcept {
278 return implementation.get();
282 GREM_API(graphics) InstanceBufferBase(Device& device,
size_t instanceSize);
286 GREM_API(graphics)
void flush()
const;
289 SharedPointer<InstanceBufferImplementation> implementation{};
292class DrawCommandBufferBase {
302 GREM_API(graphics)
void clear();
312 [[nodiscard]] SharedPointer<DrawCommandBufferImplementation> lock()
const {
314 return implementation;
325 [[nodiscard]] DrawCommandBufferImplementation* get() noexcept {
326 return implementation.get();
337 [[nodiscard]]
const DrawCommandBufferImplementation* get() const noexcept {
338 return implementation.get();
342 GREM_API(graphics) DrawCommandBufferBase(Device& device);
345 void append(SharedPointer<ShaderPipelineImplementation> shaderPipelineHandle, SharedPointer<MeshImplementation> meshHandle, uint32_t instanceOffset, uint32_t instanceCount);
347 GREM_API(graphics)
void flush()
const;
350 SharedPointer<DrawCommandBufferImplementation> implementation{};
353class UnorderedDrawCommandBufferBase {
363 GREM_API(graphics)
void clear();
373 [[nodiscard]] SharedPointer<UnorderedDrawCommandBufferImplementation> lock()
const {
375 return implementation;
386 [[nodiscard]] UnorderedDrawCommandBufferImplementation* get() noexcept {
387 return implementation.get();
398 [[nodiscard]]
const UnorderedDrawCommandBufferImplementation* get() const noexcept {
399 return implementation.get();
403 GREM_API(graphics) UnorderedDrawCommandBufferBase(Device& device);
406 void insert(SharedPointer<ShaderPipelineImplementation> shaderPipelineHandle, SharedPointer<MeshImplementation> meshHandle, uint32_t instanceOffset, uint32_t instanceCount);
408 GREM_API(graphics)
void flush()
const;
411 SharedPointer<UnorderedDrawCommandBufferImplementation> implementation{};
425template <
typename ParameterStruct, ConstantString Name>
454 : detail::UniformBufferBase(device,
LAYOUT_REFERENCE, detail::PARAMETER_VALUES_BYTES_SIZE<ParameterStruct>, detail::PARAMETER_TEXTURES_COUNT<ParameterStruct>) {}
467 void upload(
const ParameterStruct& newParameterValues) {
468 alignas(
sizeof(float) * 4)
Array<
byte, detail::PARAMETER_VALUES_BYTES_SIZE<ParameterStruct>> bytes;
470 size_t byteOffset = 0;
471 size_t textureIndex = 0;
472 meta::forEachField(newParameterValues, [&]<
typename Wrapper>(
const Wrapper& parameter) ->
void {
473 detail::alignParameter(byteOffset, detail::PARAMETER_TYPE_OF_PARAMETER_WRAPPER<Wrapper>, detail::ARRAY_ELEMENT_COUNT_OF_PARAMETER_WRAPPER<Wrapper>);
474 detail::writeParameter(bytes.data() + byteOffset, parameter);
475 detail::skipParameter(byteOffset, detail::PARAMETER_TYPE_OF_PARAMETER_WRAPPER<Wrapper>, detail::ARRAY_ELEMENT_COUNT_OF_PARAMETER_WRAPPER<Wrapper>);
476 detail::writeParameterTextures(textures.
data() + textureIndex, parameter);
477 textureIndex += detail::TEXTURE_COUNT_OF_PARAMETER_WRAPPER<Wrapper>;
479 detail::UniformBufferBase::upload(bytes, textures, detail::PARAMETER_DESCRIPTIONS<ParameterStruct>);
492template <
typename FieldStruct, ConstantString Name>
520 : detail::StorageBufferBase(device,
LAYOUT_REFERENCE, sizeof(FieldStruct)) {}
534 detail::StorageBufferBase::upload(
as_strided_bytes(newElements),
sizeof(FieldStruct));
551 detail::StorageBufferBase::write(elementOffset,
as_strided_bytes(newElements),
sizeof(FieldStruct));
567 void write(uint32_t elementIndex,
const FieldStruct& newElement) {
579template <
typename... Buffers>
606 : BufferSetBase(device,
LAYOUT_REFERENCE, {getBufferHandle(Buffers{device})...}) {}
663 template <
typename Buffer>
682 template <
typename Buffer>
705 detail::BufferSetBase::setBuffers(newBuffers);
720 detail::BufferSetBase::setBuffers(newBuffers);
737 template <
typename Buffer>
739 using ParameterStruct =
typename Buffer::parameters_type;
740 alignas(
sizeof(float) * 4)
Array<
byte, detail::PARAMETER_VALUES_BYTES_SIZE<ParameterStruct>> bytes;
742 size_t byteOffset = 0;
743 size_t textureIndex = 0;
744 meta::forEachField(newParameterValues, [&]<
typename Wrapper>(
const Wrapper& parameter) ->
void {
745 detail::alignParameter(byteOffset, detail::PARAMETER_TYPE_OF_PARAMETER_WRAPPER<Wrapper>, detail::ARRAY_ELEMENT_COUNT_OF_PARAMETER_WRAPPER<Wrapper>);
746 detail::writeParameter(bytes.data() + byteOffset, parameter);
747 detail::skipParameter(byteOffset, detail::PARAMETER_TYPE_OF_PARAMETER_WRAPPER<Wrapper>, detail::ARRAY_ELEMENT_COUNT_OF_PARAMETER_WRAPPER<Wrapper>);
748 detail::writeParameterTextures(textures.
data() + textureIndex, parameter);
749 textureIndex += detail::TEXTURE_COUNT_OF_PARAMETER_WRAPPER<Wrapper>;
768 template <
typename Buffer>
789 template <
typename Buffer>
810 template <
typename Buffer>
824template <
typename Instance>
838 : detail::InstanceBufferBase(device, sizeof(Instance)) {}
854 return detail::InstanceBufferBase::append(
as_strided_bytes(instances),
sizeof(Instance));
870 uint32_t
push(
const Instance& instance) {
882template <
typename Mesh>
885template <
typename Vertex,
typename Index,
typename Parameters,
typename Instance>
897 : detail::DrawCommandBufferBase(device) {}
920 detail::DrawCommandBufferBase::append(shaderPipeline.lock(), mesh.lock(), instanceOffset, instanceCount);
946 detail::DrawCommandBufferBase::append(shaderPipeline, mesh.lock(), instanceOffset, instanceCount);
974 detail::DrawCommandBufferBase::append(std::move(shaderPipelineHandle), std::move(meshHandle), instanceOffset, instanceCount);
991 detail::DrawCommandBufferBase::append(shaderPipeline.lock(), mesh.lock(), 0, instanceCount);
1010 detail::DrawCommandBufferBase::append(shaderPipeline, mesh.lock(), 0, instanceCount);
1031 detail::DrawCommandBufferBase::append(std::move(shaderPipelineHandle), std::move(meshHandle), 0, instanceCount);
1054 detail::DrawCommandBufferBase::append(shaderPipeline.lock(), mesh.lock(), instanceIndex, 1);
1079 detail::DrawCommandBufferBase::append(shaderPipeline, mesh.lock(), instanceIndex, 1);
1106 detail::DrawCommandBufferBase::append(std::move(shaderPipelineHandle), std::move(meshHandle), instanceIndex, 1);
1122 detail::DrawCommandBufferBase::append(shaderPipeline.lock(), mesh.lock(), 0, 1);
1140 detail::DrawCommandBufferBase::append(shaderPipeline, mesh.lock(), 0, 1);
1159 detail::DrawCommandBufferBase::append(std::move(shaderPipelineHandle), std::move(meshHandle), 0, 1);
1175template <
typename Mesh>
1178template <
typename Vertex,
typename Index,
typename Parameters,
typename Instance>
1190 : detail::UnorderedDrawCommandBufferBase(device) {}
1214 detail::UnorderedDrawCommandBufferBase::insert(shaderPipeline.lock(), mesh.lock(), instanceOffset, instanceCount);
1240 detail::UnorderedDrawCommandBufferBase::insert(shaderPipeline, mesh.lock(), instanceOffset, instanceCount);
1269 detail::UnorderedDrawCommandBufferBase::insert(std::move(shaderPipelineHandle), std::move(meshHandle), instanceOffset, instanceCount);
1286 detail::UnorderedDrawCommandBufferBase::insert(shaderPipeline.lock(), mesh.lock(), 0, instanceCount);
1305 detail::UnorderedDrawCommandBufferBase::insert(shaderPipeline, mesh.lock(), 0, instanceCount);
1327 detail::UnorderedDrawCommandBufferBase::insert(std::move(shaderPipelineHandle), std::move(meshHandle), 0, instanceCount);
1350 detail::UnorderedDrawCommandBufferBase::insert(shaderPipeline.lock(), mesh.lock(), instanceIndex, 1);
1375 detail::UnorderedDrawCommandBufferBase::insert(shaderPipeline, mesh.lock(), instanceIndex, 1);
1403 detail::UnorderedDrawCommandBufferBase::insert(std::move(shaderPipelineHandle), std::move(meshHandle), instanceIndex, 1);
1419 detail::UnorderedDrawCommandBufferBase::insert(shaderPipeline.lock(), mesh.lock(), 0, 1);
1437 detail::UnorderedDrawCommandBufferBase::insert(shaderPipeline, mesh.lock(), 0, 1);
1457 detail::UnorderedDrawCommandBufferBase::insert(std::move(shaderPipelineHandle), std::move(meshHandle), 0, 1);
Definition Allocation.hpp:25
Definition SharedPointer.hpp:65
Definition StridedSpan.hpp:427
static constexpr BufferSetLayout< Buffers... > LAYOUT
Definition buffers.hpp:583
BufferSet(Device &device, const Buffers &... buffers)
Create a new buffer set from a set of existing buffers.
Definition buffers.hpp:642
void setBuffers(const Buffers &... buffers)
Assign an existing set of buffers to the buffer set.
Definition buffers.hpp:718
static constexpr BufferLayoutReference LAYOUT_REFERENCE
Definition buffers.hpp:586
meta::TypeList< Buffers... > buffer_types
Buffer type list of the buffer set.
Definition buffers.hpp:592
BufferSet(Device &device, std::nullptr_t nullPointer)
Create an empty set of buffers that is invalid until all of its buffers have been reassigned.
Definition buffers.hpp:625
void setBuffer(const Buffer &buffer)
Assign an existing buffer to a slot in the buffer set.
Definition buffers.hpp:683
BufferSet(Device &device)
Create a new set of empty buffers.
Definition buffers.hpp:605
void write(uint32_t elementIndex, const typename Buffer::fields_type &newElement)
Upload a new element to the buffer at a specific index, overriding any element that previously occupi...
Definition buffers.hpp:811
static constexpr CStringView NAME
Definition buffers.hpp:589
void setBuffer(std::nullptr_t nullPointer)
Remove a buffer from the set, making the set invalid until all of its buffers have been reassigned.
Definition buffers.hpp:664
void write(uint32_t elementOffset, StridedSpan< const typename Buffer::fields_type > newElements)
Upload new elements to a storage buffer in the buffer set at a specific offset, overriding any data t...
Definition buffers.hpp:790
void setBuffers(std::nullptr_t nullPointer)
Reset the buffer set to an empty set that is invalid until all of its buffers have been reassigned.
Definition buffers.hpp:702
void upload(StridedSpan< const typename Buffer::fields_type > newElements)
Upload a new array of data to a storage buffer in the buffer set, overriding any previous contents.
Definition buffers.hpp:769
void upload(const typename Buffer::parameters_type &newParameterValues)
Upload new parameter values to a uniform buffer in the buffer set for the next shader invocation that...
Definition buffers.hpp:738
Persistent system managing the rendering context of a Window.
Definition Device.hpp:68
void append(const ShaderPipeline< mesh_type > &shaderPipeline, const mesh_type &mesh, uint32_t instanceOffset, uint32_t instanceCount)
Append a sequence of draw commands to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:919
void append(SharedPointer< ShaderPipelineImplementation > shaderPipelineHandle, SharedPointer< MeshImplementation > meshHandle, uint32_t instanceCount)
Append a sequence of draw commands to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1029
graphics::Mesh< Vertex, Index, Parameters, Instance > mesh_type
Mesh type of the buffer.
Definition buffers.hpp:889
void push(std::nullptr_t shaderPipeline, const mesh_type &mesh)
Append a draw command to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1139
DrawCommandBuffer(Device &device)
Create a new empty buffer set up to contain draw commands.
Definition buffers.hpp:896
void push(SharedPointer< ShaderPipelineImplementation > shaderPipelineHandle, SharedPointer< MeshImplementation > meshHandle)
Append a draw command to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1158
void append(const ShaderPipeline< mesh_type > &shaderPipeline, const mesh_type &mesh, uint32_t instanceCount)
Append a sequence of draw commands to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:990
void push(const ShaderPipeline< mesh_type > &shaderPipeline, const mesh_type &mesh, uint32_t instanceIndex)
Append a draw command to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1053
void append(SharedPointer< ShaderPipelineImplementation > shaderPipelineHandle, SharedPointer< MeshImplementation > meshHandle, uint32_t instanceOffset, uint32_t instanceCount)
Append a sequence of draw commands to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:972
void push(SharedPointer< ShaderPipelineImplementation > shaderPipelineHandle, SharedPointer< MeshImplementation > meshHandle, uint32_t instanceIndex)
Append a draw command to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1104
void push(const ShaderPipeline< mesh_type > &shaderPipeline, const mesh_type &mesh)
Append a draw command to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1121
void append(std::nullptr_t shaderPipeline, const mesh_type &mesh, uint32_t instanceCount)
Append a sequence of draw commands to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1009
void push(std::nullptr_t shaderPipeline, const mesh_type &mesh, uint32_t instanceIndex)
Append a draw command to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1078
void append(std::nullptr_t shaderPipeline, const mesh_type &mesh, uint32_t instanceOffset, uint32_t instanceCount)
Append a sequence of draw commands to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:945
Resource handle with shared ownership of a GPU memory buffer with copy-on-write value semantics conta...
Definition buffers.hpp:883
InstanceBuffer(Device &device)
Create a new empty buffer set up to contain the specified element type.
Definition buffers.hpp:837
uint32_t push(const Instance &instance)
Append an instance to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:870
uint32_t append(StridedSpan< const Instance > instances)
Append an array of instances to the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:853
Instance instance_type
Instance type of the buffer.
Definition buffers.hpp:830
Generic abstraction of a GPU vertex array object and its associated buffers.
Definition Mesh.hpp:209
Linked GPU shader pipeline.
Definition shaders.hpp:1508
StorageBuffer(Device &device)
Create a new empty buffer set up to contain the specified element type.
Definition buffers.hpp:519
FieldStruct fields_type
Field struct type of the buffer.
Definition buffers.hpp:498
void write(uint32_t elementIndex, const FieldStruct &newElement)
Upload a new element to the buffer at a specific index, overriding any element that previously occupi...
Definition buffers.hpp:567
void write(uint32_t elementOffset, StridedSpan< const FieldStruct > newElements)
Upload new elements to the buffer at a specific offset, overriding any data that previously occupied ...
Definition buffers.hpp:550
static constexpr BufferLayoutReference LAYOUT_REFERENCE
Definition buffers.hpp:504
static constexpr CStringView NAME
Definition buffers.hpp:507
void upload(StridedSpan< const FieldStruct > newElements)
Upload a new array of data to the buffer, overriding any previous contents.
Definition buffers.hpp:533
static constexpr StorageBufferLayout< VolumeFields, Name > LAYOUT
Definition buffers.hpp:501
void insertRange(const ShaderPipeline< mesh_type > &shaderPipeline, const mesh_type &mesh, uint32_t instanceCount)
Insert a sequence of draw commands into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1285
void insert(std::nullptr_t shaderPipeline, const mesh_type &mesh, uint32_t instanceIndex)
Insert a draw command into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1374
void insert(std::nullptr_t shaderPipeline, const mesh_type &mesh)
Insert a draw command into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1436
void insertRange(SharedPointer< ShaderPipelineImplementation > shaderPipelineHandle, SharedPointer< MeshImplementation > meshHandle, uint32_t instanceCount)
Insert a sequence of draw commands into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1325
void insert(const ShaderPipeline< mesh_type > &shaderPipeline, const mesh_type &mesh, uint32_t instanceIndex)
Insert a draw command into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1349
void insertRange(std::nullptr_t shaderPipeline, const mesh_type &mesh, uint32_t instanceCount)
Insert a sequence of draw commands into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1304
void insertRange(SharedPointer< ShaderPipelineImplementation > shaderPipelineHandle, SharedPointer< MeshImplementation > meshHandle, uint32_t instanceOffset, uint32_t instanceCount)
Insert a sequence of draw commands into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1267
void insert(SharedPointer< ShaderPipelineImplementation > shaderPipelineHandle, SharedPointer< MeshImplementation > meshHandle)
Insert a draw command into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1456
void insertRange(std::nullptr_t shaderPipeline, const mesh_type &mesh, uint32_t instanceOffset, uint32_t instanceCount)
Insert a sequence of draw commands into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1239
void insertRange(const ShaderPipeline< mesh_type > &shaderPipeline, const mesh_type &mesh, uint32_t instanceOffset, uint32_t instanceCount)
Insert a sequence of draw commands into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1212
void insert(const ShaderPipeline< mesh_type > &shaderPipeline, const mesh_type &mesh)
Insert a draw command into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1418
UnorderedDrawCommandBuffer(Device &device)
Create a new empty buffer set up to contain draw commands.
Definition buffers.hpp:1189
void insert(SharedPointer< ShaderPipelineImplementation > shaderPipelineHandle, SharedPointer< MeshImplementation > meshHandle, uint32_t instanceIndex)
Insert a draw command into the buffer, growing the buffer capacity if necessary.
Definition buffers.hpp:1401
graphics::Mesh< Vertex, Index, Parameters, Instance > mesh_type
Mesh type of the buffer.
Definition buffers.hpp:1182
Resource handle with shared ownership of a GPU memory buffer with copy-on-write value semantics conta...
Definition buffers.hpp:1176
Concept that checks if a type is a valid field struct type for a shader-read buffer.
Definition FieldDescription.hpp:123
Concept that checks if a type is a valid parameter struct type for a shader-read buffer.
Definition ParameterDescription.hpp:318
Definition concepts.hpp:35
Definition buffer_layouts.hpp:20
StridedSpan(R &&range) -> StridedSpan< std::remove_reference_t< decltype(*std::data(range))>, DYNAMIC_EXTENT, sizeof(std::remove_reference_t< decltype(*std::data(range))>)>
Span(R &&range) -> Span< std::remove_reference_t< decltype(*std::data(range))> >
auto as_strided_bytes(StridedSpan< T, N, S > s) noexcept
Definition StridedSpan.hpp:725
CStringViewBase< char, std::char_traits< char > > CStringView
Definition CStringView.hpp:635
constexpr pointer data() noexcept
Definition Array.hpp:79
Generic type-erased read-only reference to a buffer or buffer set layout.
Definition buffer_layouts.hpp:43
Type-erased read-only reference to a BufferSetLayout.
Definition buffer_layouts.hpp:37
Layout description of a BufferSet.
Definition buffer_layouts.hpp:168
Type-erased read-only reference to a StorageBufferLayout.
Definition buffer_layouts.hpp:29
Layout description of a StorageBuffer.
Definition buffer_layouts.hpp:125