Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Metal::BindlessArgumentBuffer Class Reference

#include <BindlessArgumentBuffer.h>

Public Member Functions

RHI::ResultCode Init (Device *device, const AZ::RHI::BindlessSrgDescriptor &bindlessSrgDesc)
 
RHI::Ptr< ArgumentBufferGetBindlessArgbuffer () const
 Provide access to the bindless argument buffer.
 
uint32_t AttachReadImage (ImageView &imageView)
 Add/Update a read only image pointer to the global bindless heap.
 
uint32_t AttachReadCubeMapImage (ImageView &view)
 Add/Update a read only cubemap image descriptor to the global bindless heap.
 
uint32_t AttachReadWriteImage (ImageView &imageView)
 Add/Update a read write image pointer to the global bindless heap.
 
uint32_t AttachReadBuffer (BufferView &bufferView)
 Add/Update a read only buffer pointer to the global bindless heap.
 
uint32_t AttachReadWriteBuffer (BufferView &bufferView)
 Add/Update a read write buffer pointer to the global bindless heap.
 
void DetachReadImage (uint32_t index)
 Remove the index associated with a read only image descriptor from the free list allocator.
 
void DetachReadCubeMapImage (uint32_t index)
 Remove the index associated with a read only cubemapimage descriptor from the free list allocator.
 
void DetachReadWriteImage (uint32_t index)
 Remove the index associated with a read write image descriptor from the free list allocator.
 
void DetachReadBuffer (uint32_t index)
 Remove the index associated with a read only buffer descriptor from the free list allocator.
 
void DetachReadWriteBuffer (uint32_t index)
 Remove the index associated with a read write buffer descriptor from the free list allocator.
 
void GarbageCollect ()
 Garbage collect all the free list allocators related to all the bindless resource types.
 
void BindBindlessArgumentBuffer (uint32_t slotIndex, CommandEncoderType commandEncoderType, CommandList::MetalArgumentBufferArray &mtlVertexArgBuffers, CommandList::MetalArgumentBufferArrayOffsets &mtlVertexArgBufferOffsets, CommandList::MetalArgumentBufferArray &mtlFragmentOrComputeArgBuffers, CommandList::MetalArgumentBufferArrayOffsets &mtlFragmentOrComputeArgBufferOffsets, uint32_t &bufferVertexRegisterIdMin, uint32_t &bufferVertexRegisterIdMax, uint32_t &bufferFragmentOrComputeRegisterIdMin, uint32_t &bufferFragmentOrComputeRegisterIdMax)
 
void MakeBindlessArgumentBuffersResident (CommandEncoderType commandEncoderType, ArgumentBuffer::ResourcesPerStageForGraphics &untrackedResourcesGfxRead, ArgumentBuffer::ResourcesForCompute &untrackedResourceComputeRead)
 Add all the bindless resource views indirectly bound to the maps passed in so that they can be made resident.
 
uint32_t GetBindlessSrgBindingSlot ()
 Return the binding slot for the bindless srg.
 
bool IsInitialized () const
 Boolean to return true if the pool is initialized.
 

Detailed Description

This class is responsible for managing the global bindless heap. It provides support for this heap via both unbounded array as well as bounded arrays.

Member Function Documentation

◆ BindBindlessArgumentBuffer()

void AZ::Metal::BindlessArgumentBuffer::BindBindlessArgumentBuffer ( uint32_t  slotIndex,
CommandEncoderType  commandEncoderType,
CommandList::MetalArgumentBufferArray &  mtlVertexArgBuffers,
CommandList::MetalArgumentBufferArrayOffsets &  mtlVertexArgBufferOffsets,
CommandList::MetalArgumentBufferArray &  mtlFragmentOrComputeArgBuffers,
CommandList::MetalArgumentBufferArrayOffsets &  mtlFragmentOrComputeArgBufferOffsets,
uint32_t &  bufferVertexRegisterIdMin,
uint32_t &  bufferVertexRegisterIdMax,
uint32_t &  bufferFragmentOrComputeRegisterIdMin,
uint32_t &  bufferFragmentOrComputeRegisterIdMax 
)

Add all the argument buffers related to the global bindless heap to the maps passed in so that it can be bound to the encoder efficiently


The documentation for this class was generated from the following file: