|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/RenderAPI/GPUResourceSet.hpp>
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 GPUResourceBinding * | get (const StringView name, const UInt32 index=0) const |
Gets a GPUResourceBinding by it's reflection name and index. | |
| GPUResourceBinding * | get (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 GPUResourceBinding * | get (const UInt32 slot, const UInt32 index=0) const |
Gets a GPUResourceBinding by it's reflection slot and index. | |
| GPUResourceBinding * | get (const UInt32 slot, const UInt32 index=0) |
Gets a GPUResourceBinding by it's reflection slot and index. | |
| GPUResourceBinding & | set (const UInt32 slot, const UInt32 index, GPUResourceBinding binding) |
Sets the GPUResourceBinding for the given binding slot and index. | |
| GPUResourceBinding & | set (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 GPUResourceBinding * | get (const UInt32 slot, const UInt32 index=0) const |
Gets a GPUResourceBinding by it's reflection slot and index. | |
| GPUResourceBinding * | get (const UInt32 slot, const UInt32 index=0) |
Gets a GPUResourceBinding by it's reflection slot and index. | |
| GPUResourceBinding & | set (const UInt32 slot, const UInt32 index, GPUResourceBinding binding) |
Sets the GPUResourceBinding for the given binding slot and index. | |
| GPUResourceBinding & | set (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 GPUShaderReflectionDescriptor & | mReflectionDescriptor |
| A descriptor that describes the reflection data from the shader. | |
| UInt32 | mSetIndex = 0 |
| The resource set being built. | |
|
explicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.
| shader | The shader to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
inlineexplicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.
| shader | The shader to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
explicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.
| shaderProgram | The shader program to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
inlineexplicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.
| shaderProgram | The shader program to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
explicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
| pipeline | The pipeline to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
inlineexplicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
| pipeline | The pipeline to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
explicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.
| pipeline | The pipeline to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
inlineexplicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.
| pipeline | The pipeline to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
explicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
| pipeline | The pipeline to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
inlineexplicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
| pipeline | The pipeline to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
explicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.
| existingBindings | The existing bindings to be copied to this bindings object. |
| shader | The shader to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
inlineexplicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUShader.
| existingBindings | The existing bindings to be copied to this bindings object. |
| shader | The shader to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
explicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.
| existingBindings | The existing bindings to be copied to this bindings object. |
| shaderProgram | The shader program to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
inlineexplicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUShaderProgram.
| existingBindings | The existing bindings to be copied to this bindings object. |
| shaderProgram | The shader program to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
explicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
| existingBindings | The existing bindings to be copied to this bindings object. |
| pipeline | The pipeline to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
inlineexplicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUGraphicsPipeline.
| existingBindings | The existing bindings to be copied to this bindings object. |
| pipeline | The pipeline to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
explicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.
| existingBindings | The existing bindings to be copied to this bindings object. |
| pipeline | The pipeline to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
inlineexplicit |
Constructs a new GPUShaderResourceSetBindings suitable a given GPUComputePipeline.
| existingBindings | The existing bindings to be copied to this bindings object. |
| pipeline | The pipeline to construct the bindings for. |
| setIndex | The set index to create the bindings for. |
|
inline |
Adds a new GPUResourceBinding for the given binding name.
| name | The name of the binding to be set. |
| binding | The value to set the binding to. |
|
inline |
Adds a new GPUResourceBinding for the given binding slot.
| slot | The slot of the binding to be set. |
| binding | The value to set the binding to. |
|
inline |
Clears all values of the given key.
|
inline |
Clears all the bindings a for the given binding slot name.
| name | The slot of the binding to resize the number of bound resources. |
|
private |
Finds the binding named name using reflection data.
| name | The binding name. |
~0u if no such binding exists.
|
inline |
Gets a GPUResourceBinding by it's reflection name and index.
| name | The name of the binding to be retrieved. |
| index | The index of the binding to be retrieved. |
nullptr if it's not present on the resource binding set.
|
inline |
Gets a GPUResourceBinding by it's reflection name and index.
| name | The name of the binding to be retrieved. |
| index | The index of the binding to be retrieved. |
nullptr if it's not present on the resource binding set.
|
inline |
Gets a GPUResourceBinding by it's reflection slot and index.
| slot | The slot of the binding to be retrieved. |
| index | The index of the binding to be retrieved. |
nullptr if it's not present on the resource binding set.
|
inline |
Gets a GPUResourceBinding by it's reflection slot and index.
| slot | The slot of the binding to be retrieved. |
| index | The index of the binding to be retrieved. |
nullptr if it's not present on the resource binding set.
|
inline |
Determines if a binding with the given name exists on the reflection metadata.
| name | The name binding to be checked for presence. |
true if the binding exists; false otherwise. | bool CeresEngine::GPUShaderResourceSetBindings::has | ( | UInt32 | slot | ) | const |
Determines if a binding with the given slot exists on the reflection metadata.
| slot | The slot to be checked for presence. |
true if the binding exists; false otherwise.
|
inline |
Helper method to have expressive access of the resource bindings.
| name | The name of the binding to be accessed. |
|
inline |
Helper method to have expressive access of the resource bindings.
| name | The name of the binding to be accessed. |
|
inline |
Removes a GPUResourceBinding for the given binding slot.
| name | The name of the binding to be set. |
|
inline |
Removes a GPUResourceBinding for the given binding slot and index.
| name | The name of the binding to be set. |
| index | The index of the binding to be removed. |
Removes a GPUResourceBinding for the given binding slot and index.
| slot | The slot of the binding to be removed. |
| index | The index of the binding to be removed. |
|
inline |
Removes a GPUResourceBinding for the given binding slot.
| slot | The slot of the binding to be removed. |
|
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.
| key | The key to resize the elements on. |
| newSize | The new size to set on the key. |
| value | The value to initialize any new value with. |
|
inline |
Resizes the bindings a for the given binding slot name.
| name | The slot of the binding to resize the number of bound resources. |
| newSize | The new size to resize the collection to. |
|
inline |
Sets the GPUResourceBinding for the given binding name and index.
| name | The name of the binding to be set. |
| index | The index of the binding to be set. |
| binding | The value to set the binding to. |
|
inline |
Sets the GPUResourceBinding for the given binding name and index.
binding.| name | The name of the binding to be set. |
| binding | The value to set the binding to. |
|
inline |
Sets the GPUResourceBinding for the given binding slot and index.
| slot | The slot of the binding to be set. |
| index | The index of the binding to be set. |
| binding | The value to set the binding to. |
|
inline |
Sets the GPUResourceBinding for the given binding slot and index.
binding.| slot | The slot of the binding to be set. |
| binding | The value to set the binding to. |
|
inline |
Gets the total number of GPUResourceBinding on the bindings object.
|
inline |
Gets the number of GPUResourceBinding by on the given slot.
| name | The slot of the binding to count the number of bound resources. |
Gets the number of GPUResourceBinding by on the given slot.
| slot | The slot of the binding to count the number of bound resources. |
|
private |
A descriptor that describes the reflection data from the shader.
|
private |
The resource set being built.
If multiple sets are defined, bindings on this set will be reflected.