CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GPUShaderResourceSetBindings Class Reference

#include <CeresEngine/RenderAPI/GPUResourceSet.hpp>

Inheritance diagram for CeresEngine::GPUShaderResourceSetBindings:
CeresEngine::GPUResourceSetBindings CeresEngine::BasicIndexedMultimap< Key, Value, Container >

Public Member Functions

 GPUShaderResourceSetBindings (const GPUShader &shader, UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.
 
 GPUShaderResourceSetBindings (const GPUShaderPtr &shader, const UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.
 
 GPUShaderResourceSetBindings (const GPUShaderProgram &shaderProgram, UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.
 
 GPUShaderResourceSetBindings (const GPUShaderProgramPtr &shaderProgram, const UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.
 
 GPUShaderResourceSetBindings (const GPUGraphicsPipeline &pipeline, UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
 
 GPUShaderResourceSetBindings (const GPUGraphicsPipelinePtr &pipeline, const UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
 
 GPUShaderResourceSetBindings (const GPUComputePipeline &pipeline, UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.
 
 GPUShaderResourceSetBindings (const GPUComputePipelinePtr &pipeline, const UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.
 
 GPUShaderResourceSetBindings (const GPUPipelineLayout &pipeline, UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
 
 GPUShaderResourceSetBindings (const GPUPipelineLayoutPtr &pipelineLayout, const UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
 
 GPUShaderResourceSetBindings (const GPUResourceSetBindings &existingBindings, const GPUShader &shader, UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.
 
 GPUShaderResourceSetBindings (const GPUResourceSetBindings &existingBindings, const GPUShaderPtr &shader, const UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.
 
 GPUShaderResourceSetBindings (const GPUResourceSetBindings &existingBindings, const GPUShaderProgram &shaderProgram, UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.
 
 GPUShaderResourceSetBindings (const GPUResourceSetBindings &existingBindings, const GPUShaderProgramPtr &shaderProgram, const UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.
 
 GPUShaderResourceSetBindings (const GPUResourceSetBindings &existingBindings, const GPUGraphicsPipeline &pipeline, UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
 
 GPUShaderResourceSetBindings (const GPUResourceSetBindings &existingBindings, const GPUGraphicsPipelinePtr &pipeline, const UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
 
 GPUShaderResourceSetBindings (const GPUResourceSetBindings &existingBindings, const GPUComputePipeline &pipeline, UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.
 
 GPUShaderResourceSetBindings (const GPUResourceSetBindings &existingBindings, const GPUComputePipelinePtr &pipeline, const UInt32 setIndex=0)
 Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.
 
bool has (const StringView name) const
 Determines if a binding with the given name exists on the reflection metadata.
 
bool has (UInt32 slot) const
 Determines if a binding with the given slot exists on the reflection metadata.
 
const GPUResourceBindingget (const StringView name, const UInt32 index=0) const
 Gets a GPUResourceBinding by it's reflection name and index.
 
GPUResourceBindingget (const StringView name, const UInt32 index=0)
 Gets a GPUResourceBinding by it's reflection name and index.
 
void set (const StringView name, const UInt32 index, GPUResourceBinding binding)
 Sets the GPUResourceBinding for the given binding name and index.
 
void set (const StringView name, GPUResourceBinding binding)
 Sets the GPUResourceBinding for the given binding name and index.
 
UInt32 add (const StringView name, GPUResourceBinding binding)
 Adds a new GPUResourceBinding for the given binding name.
 
void remove (const StringView name, const UInt32 index)
 Removes a GPUResourceBinding for the given binding slot and index.
 
void remove (const StringView name)
 Removes a GPUResourceBinding for the given binding slot.
 
UInt32 size (const StringView name) const
 Gets the number of GPUResourceBinding by on the given slot.
 
void resize (const StringView name, const UInt32 newSize, const GPUResourceBinding &defaultValue={})
 Resizes the bindings a for the given binding slot name.
 
void clear (const StringView name)
 Clears all the bindings a for the given binding slot name.
 
auto operator[] (const StringView name)
 Helper method to have expressive access of the resource bindings.
 
auto operator[] (const StringView name) const
 Helper method to have expressive access of the resource bindings.
 
const GPUResourceBindingget (const UInt32 slot, const UInt32 index=0) const
 Gets a GPUResourceBinding by it's reflection slot and index.
 
GPUResourceBindingget (const UInt32 slot, const UInt32 index=0)
 Gets a GPUResourceBinding by it's reflection slot and index.
 
GPUResourceBindingset (const UInt32 slot, const UInt32 index, GPUResourceBinding binding)
 Sets the GPUResourceBinding for the given binding slot and index.
 
GPUResourceBindingset (UInt32 slot, GPUResourceBinding binding)
 Sets the GPUResourceBinding for the given binding slot and index.
 
UInt32 add (const UInt32 slot, GPUResourceBinding binding)
 Adds a new GPUResourceBinding for the given binding slot.
 
void remove (const UInt32 slot, const UInt32 index)
 Removes a GPUResourceBinding for the given binding slot and index.
 
void remove (UInt32 slot)
 Removes a GPUResourceBinding for the given binding slot.
 
UInt32 size (const UInt32 slot) const
 Gets the number of GPUResourceBinding by on the given slot.
 
UInt32 size () const
 Gets the total number of GPUResourceBinding on the bindings object.
 
template<typename K = Key>
void resize (const K &key, size_type newSize, const Value &value=Value())
 Resizes the container and ensures that there are exactly newSize items on the given key.
 
template<typename K = Key>
void clear (const K &key)
 Clears all values of the given key.
 
- Public Member Functions inherited from CeresEngine::GPUResourceSetBindings
 GPUResourceSetBindings ()=default
 
 GPUResourceSetBindings (InitializerList< Pair< UInt32, Variant< GPUResourceBinding, InitializerList< GPUResourceBinding > > > > initializer)
 Initializes a new GPUResourceSetBindings object with one or more bindings per slot.
 
const GPUResourceBindingget (const UInt32 slot, const UInt32 index=0) const
 Gets a GPUResourceBinding by it's reflection slot and index.
 
GPUResourceBindingget (const UInt32 slot, const UInt32 index=0)
 Gets a GPUResourceBinding by it's reflection slot and index.
 
GPUResourceBindingset (const UInt32 slot, const UInt32 index, GPUResourceBinding binding)
 Sets the GPUResourceBinding for the given binding slot and index.
 
GPUResourceBindingset (UInt32 slot, GPUResourceBinding binding)
 Sets the GPUResourceBinding for the given binding slot and index.
 
UInt32 add (const UInt32 slot, GPUResourceBinding binding)
 Adds a new GPUResourceBinding for the given binding slot.
 
void remove (const UInt32 slot, const UInt32 index)
 Removes a GPUResourceBinding for the given binding slot and index.
 
void remove (UInt32 slot)
 Removes a GPUResourceBinding for the given binding slot.
 
UInt32 size (const UInt32 slot) const
 Gets the number of GPUResourceBinding by on the given slot.
 
UInt32 size () const
 Gets the total number of GPUResourceBinding on the bindings object.
 
GPUResourceSetBindingSlot operator[] (UInt32 slot)
 Helper method to have expressive access of the resource bindings.
 
GPUResourceSetConstBindingSlot operator[] (UInt32 slot) const
 Helper method to have expressive access of the resource bindings.
 
Generator< Pair< Pair< UInt32, UInt32 >, GPUResourceBinding & > > forEach ()
 Iterates over each of the entries in the GPUResourceSetBindings.
 
Generator< Pair< Pair< UInt32, UInt32 >, const GPUResourceBinding & > > forEach () const
 Iterates over each of the entries in the GPUResourceSetBindings.
 
GPUResourceSetDescriptor createDescriptor () const &
 
GPUResourceSetDescriptor createDescriptor () &&
 
void reserve (size_type newCapacity)
 Tries to increase capacity by allocating additional memory.
 
template<typename K = Key>
void resize (const K &key, size_type newSize, const Value &value=Value())
 Resizes the container and ensures that there are exactly newSize items on the given key.
 
template<typename K = Key>
void clear (const K &key)
 Clears all values of the given key.
 

Private Types

using super = GPUResourceSetBindings
 

Private Member Functions

UInt32 findSlotIndex (StringView name) const
 Finds the binding named name using reflection data.
 

Private Attributes

const GPUShaderReflectionDescriptormReflectionDescriptor
 A descriptor that describes the reflection data from the shader.
 
UInt32 mSetIndex = 0
 The resource set being built.
 

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ GPUShaderResourceSetBindings() [1/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUShader shader,
UInt32  setIndex = 0 
)
explicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.

Parameters
shaderThe shader to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [2/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUShaderPtr shader,
const UInt32  setIndex = 0 
)
inlineexplicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.

Parameters
shaderThe shader to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [3/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUShaderProgram shaderProgram,
UInt32  setIndex = 0 
)
explicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.

Parameters
shaderProgramThe shader program to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [4/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUShaderProgramPtr shaderProgram,
const UInt32  setIndex = 0 
)
inlineexplicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.

Parameters
shaderProgramThe shader program to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [5/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUGraphicsPipeline pipeline,
UInt32  setIndex = 0 
)
explicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.

Parameters
pipelineThe pipeline to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [6/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUGraphicsPipelinePtr pipeline,
const UInt32  setIndex = 0 
)
inlineexplicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.

Parameters
pipelineThe pipeline to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [7/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUComputePipeline pipeline,
UInt32  setIndex = 0 
)
explicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.

Parameters
pipelineThe pipeline to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [8/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUComputePipelinePtr pipeline,
const UInt32  setIndex = 0 
)
inlineexplicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.

Parameters
pipelineThe pipeline to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [9/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUPipelineLayout pipeline,
UInt32  setIndex = 0 
)
explicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.

Parameters
pipelineThe pipeline to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [10/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUPipelineLayoutPtr pipelineLayout,
const UInt32  setIndex = 0 
)
inlineexplicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.

Parameters
pipelineThe pipeline to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [11/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUResourceSetBindings existingBindings,
const GPUShader shader,
UInt32  setIndex = 0 
)
explicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.

Note
The existing bindings are assumed to be valid and won't have non-existing entries removed.
Parameters
existingBindingsThe existing bindings to be copied to this bindings object.
shaderThe shader to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [12/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUResourceSetBindings existingBindings,
const GPUShaderPtr shader,
const UInt32  setIndex = 0 
)
inlineexplicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.

Note
The existing bindings are assumed to be valid and won't have non-existing entries removed.
Parameters
existingBindingsThe existing bindings to be copied to this bindings object.
shaderThe shader to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [13/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUResourceSetBindings existingBindings,
const GPUShaderProgram shaderProgram,
UInt32  setIndex = 0 
)
explicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.

Note
The existing bindings are assumed to be valid and won't have non-existing entries removed.
Parameters
existingBindingsThe existing bindings to be copied to this bindings object.
shaderProgramThe shader program to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [14/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUResourceSetBindings existingBindings,
const GPUShaderProgramPtr shaderProgram,
const UInt32  setIndex = 0 
)
inlineexplicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.

Note
The existing bindings are assumed to be valid and won't have non-existing entries removed.
Parameters
existingBindingsThe existing bindings to be copied to this bindings object.
shaderProgramThe shader program to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [15/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUResourceSetBindings existingBindings,
const GPUGraphicsPipeline pipeline,
UInt32  setIndex = 0 
)
explicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.

Note
The existing bindings are assumed to be valid and won't have non-existing entries removed.
Parameters
existingBindingsThe existing bindings to be copied to this bindings object.
pipelineThe pipeline to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [16/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUResourceSetBindings existingBindings,
const GPUGraphicsPipelinePtr pipeline,
const UInt32  setIndex = 0 
)
inlineexplicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.

Note
The existing bindings are assumed to be valid and won't have non-existing entries removed.
Parameters
existingBindingsThe existing bindings to be copied to this bindings object.
pipelineThe pipeline to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [17/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUResourceSetBindings existingBindings,
const GPUComputePipeline pipeline,
UInt32  setIndex = 0 
)
explicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.

Note
The existing bindings are assumed to be valid and won't have non-existing entries removed.
Parameters
existingBindingsThe existing bindings to be copied to this bindings object.
pipelineThe pipeline to construct the bindings for.
setIndexThe set index to create the bindings for.

◆ GPUShaderResourceSetBindings() [18/18]

CeresEngine::GPUShaderResourceSetBindings::GPUShaderResourceSetBindings ( const GPUResourceSetBindings existingBindings,
const GPUComputePipelinePtr pipeline,
const UInt32  setIndex = 0 
)
inlineexplicit

Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.

Note
The existing bindings are assumed to be valid and won't have non-existing entries removed.
Parameters
existingBindingsThe existing bindings to be copied to this bindings object.
pipelineThe pipeline to construct the bindings for.
setIndexThe set index to create the bindings for.

Member Function Documentation

◆ add() [1/2]

UInt32 CeresEngine::GPUShaderResourceSetBindings::add ( const StringView  name,
GPUResourceBinding  binding 
)
inline

Adds a new GPUResourceBinding for the given binding name.

Note
This method will append a new entry to the end of the binding array.
Parameters
nameThe name of the binding to be set.
bindingThe value to set the binding to.
Returns
The index of the newly bound array entry.

◆ add() [2/2]

UInt32 CeresEngine::GPUResourceSetBindings::add ( const UInt32  slot,
GPUResourceBinding  binding 
)
inline

Adds a new GPUResourceBinding for the given binding slot.

Note
This method will append a new entry to the end of the binding array.
Parameters
slotThe slot of the binding to be set.
bindingThe value to set the binding to.
Returns
The index of the newly bound array entry.

◆ clear() [1/2]

template<typename K = Key>
void CeresEngine::BasicIndexedMultimap< Key, Value, Container >::clear ( const K key)
inline

Clears all values of the given key.

◆ clear() [2/2]

void CeresEngine::GPUShaderResourceSetBindings::clear ( const StringView  name)
inline

Clears all the bindings a for the given binding slot name.

Parameters
nameThe slot of the binding to resize the number of bound resources.

◆ findSlotIndex()

UInt32 CeresEngine::GPUShaderResourceSetBindings::findSlotIndex ( StringView  name) const
private

Finds the binding named name using reflection data.

Parameters
nameThe binding name.
Returns
The binding slot index or ~0u if no such binding exists.

◆ get() [1/4]

GPUResourceBinding * CeresEngine::GPUShaderResourceSetBindings::get ( const StringView  name,
const UInt32  index = 0 
)
inline

Gets a GPUResourceBinding by it's reflection name and index.

Parameters
nameThe name of the binding to be retrieved.
indexThe index of the binding to be retrieved.
Returns
A pointer to the binding if it exists or nullptr if it's not present on the resource binding set.

◆ get() [2/4]

const GPUResourceBinding * CeresEngine::GPUShaderResourceSetBindings::get ( const StringView  name,
const UInt32  index = 0 
) const
inline

Gets a GPUResourceBinding by it's reflection name and index.

Parameters
nameThe name of the binding to be retrieved.
indexThe index of the binding to be retrieved.
Returns
A pointer to the binding if it exists or nullptr if it's not present on the resource binding set.

◆ get() [3/4]

GPUResourceBinding * CeresEngine::GPUResourceSetBindings::get ( const UInt32  slot,
const UInt32  index = 0 
)
inline

Gets a GPUResourceBinding by it's reflection slot and index.

Parameters
slotThe slot of the binding to be retrieved.
indexThe index of the binding to be retrieved.
Returns
A pointer to the binding if it exists or nullptr if it's not present on the resource binding set.

◆ get() [4/4]

const GPUResourceBinding * CeresEngine::GPUResourceSetBindings::get ( const UInt32  slot,
const UInt32  index = 0 
) const
inline

Gets a GPUResourceBinding by it's reflection slot and index.

Parameters
slotThe slot of the binding to be retrieved.
indexThe index of the binding to be retrieved.
Returns
A pointer to the binding if it exists or nullptr if it's not present on the resource binding set.

◆ has() [1/2]

bool CeresEngine::GPUShaderResourceSetBindings::has ( const StringView  name) const
inline

Determines if a binding with the given name exists on the reflection metadata.

Parameters
nameThe name binding to be checked for presence.
Returns
true if the binding exists; false otherwise.

◆ has() [2/2]

bool CeresEngine::GPUShaderResourceSetBindings::has ( UInt32  slot) const

Determines if a binding with the given slot exists on the reflection metadata.

Parameters
slotThe slot to be checked for presence.
Returns
true if the binding exists; false otherwise.

◆ operator[]() [1/2]

auto CeresEngine::GPUShaderResourceSetBindings::operator[] ( const StringView  name)
inline

Helper method to have expressive access of the resource bindings.

Parameters
nameThe name of the binding to be accessed.

◆ operator[]() [2/2]

auto CeresEngine::GPUShaderResourceSetBindings::operator[] ( const StringView  name) const
inline

Helper method to have expressive access of the resource bindings.

Parameters
nameThe name of the binding to be accessed.

◆ remove() [1/4]

void CeresEngine::GPUShaderResourceSetBindings::remove ( const StringView  name)
inline

Removes a GPUResourceBinding for the given binding slot.

Note
This method will remove all bound resources to the given slot.
Parameters
nameThe name of the binding to be set.

◆ remove() [2/4]

void CeresEngine::GPUShaderResourceSetBindings::remove ( const StringView  name,
const UInt32  index 
)
inline

Removes a GPUResourceBinding for the given binding slot and index.

Parameters
nameThe name of the binding to be set.
indexThe index of the binding to be removed.

◆ remove() [3/4]

void CeresEngine::GPUResourceSetBindings::remove ( const UInt32  slot,
const UInt32  index 
)
inline

Removes a GPUResourceBinding for the given binding slot and index.

Parameters
slotThe slot of the binding to be removed.
indexThe index of the binding to be removed.

◆ remove() [4/4]

void CeresEngine::GPUResourceSetBindings::remove ( UInt32  slot)
inline

Removes a GPUResourceBinding for the given binding slot.

Note
This method will remove all bound resources to the given slot.
Parameters
slotThe slot of the binding to be removed.

◆ resize() [1/2]

template<typename K = Key>
void CeresEngine::BasicIndexedMultimap< Key, Value, Container >::resize ( const K key,
size_type  newSize,
const Value &  value = Value() 
)
inline

Resizes the container and ensures that there are exactly newSize items on the given key.

If any new value must be created on the map, they will be initialized by constructing a copy of value.

Parameters
keyThe key to resize the elements on.
newSizeThe new size to set on the key.
valueThe value to initialize any new value with.

◆ resize() [2/2]

void CeresEngine::GPUShaderResourceSetBindings::resize ( const StringView  name,
const UInt32  newSize,
const GPUResourceBinding defaultValue = {} 
)
inline

Resizes the bindings a for the given binding slot name.

Parameters
nameThe slot of the binding to resize the number of bound resources.
newSizeThe new size to resize the collection to.

◆ set() [1/4]

void CeresEngine::GPUShaderResourceSetBindings::set ( const StringView  name,
const UInt32  index,
GPUResourceBinding  binding 
)
inline

Sets the GPUResourceBinding for the given binding name and index.

Parameters
nameThe name of the binding to be set.
indexThe index of the binding to be set.
bindingThe value to set the binding to.

◆ set() [2/4]

void CeresEngine::GPUShaderResourceSetBindings::set ( const StringView  name,
GPUResourceBinding  binding 
)
inline

Sets the GPUResourceBinding for the given binding name and index.

Note
If the binding already has one or more elements on it, they will all be replaced and set to binding.
Parameters
nameThe name of the binding to be set.
bindingThe value to set the binding to.

◆ set() [3/4]

GPUResourceBinding & CeresEngine::GPUResourceSetBindings::set ( const UInt32  slot,
const UInt32  index,
GPUResourceBinding  binding 
)
inline

Sets the GPUResourceBinding for the given binding slot and index.

Parameters
slotThe slot of the binding to be set.
indexThe index of the binding to be set.
bindingThe value to set the binding to.

◆ set() [4/4]

GPUResourceBinding & CeresEngine::GPUResourceSetBindings::set ( UInt32  slot,
GPUResourceBinding  binding 
)
inline

Sets the GPUResourceBinding for the given binding slot and index.

Note
If the binding already has one or more elements on it, they will all be replaced and set to binding.
Parameters
slotThe slot of the binding to be set.
bindingThe value to set the binding to.

◆ size() [1/3]

UInt32 CeresEngine::GPUResourceSetBindings::size ( ) const
inline

Gets the total number of GPUResourceBinding on the bindings object.

Returns
The total number of bindings.

◆ size() [2/3]

UInt32 CeresEngine::GPUShaderResourceSetBindings::size ( const StringView  name) const
inline

Gets the number of GPUResourceBinding by on the given slot.

Parameters
nameThe slot of the binding to count the number of bound resources.
Returns
The number of bindings in the given slot.

◆ size() [3/3]

UInt32 CeresEngine::GPUResourceSetBindings::size ( const UInt32  slot) const
inline

Gets the number of GPUResourceBinding by on the given slot.

Parameters
slotThe slot of the binding to count the number of bound resources.
Returns
The number of bindings in the given slot.

Member Data Documentation

◆ mReflectionDescriptor

const GPUShaderReflectionDescriptor& CeresEngine::GPUShaderResourceSetBindings::mReflectionDescriptor
private

A descriptor that describes the reflection data from the shader.

◆ mSetIndex

UInt32 CeresEngine::GPUShaderResourceSetBindings::mSetIndex = 0
private

The resource set being built.

If multiple sets are defined, bindings on this set will be reflected.


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