|
HDK
|
#include <RV_ShaderProgram.h>
Inheritance diagram for RV_ShaderProgramBase:Public Member Functions | |
| RV_ShaderProgramBase (RV_Instance *inst, RV_VKPipelineLayoutPtr pipe_layout) | |
| virtual | ~RV_ShaderProgramBase () |
| void | setName (const UT_StringHolder &name) |
| Set a descriptive name for the shader. More... | |
| const UT_StringHolder & | name () const |
| Descriptive name of the shader. More... | |
| virtual RV_ShaderType | getShaderType () const =0 |
| Type of shader - graphics or compute. More... | |
| const UT_Array< exint > & | layoutIds () const |
| int | getMaxSetNumber () const |
| The number of descriptor sets in the shader. More... | |
| bool | hasSet (int set_num) const |
| Query if set 'set_num' is used by the shader. More... | |
| bool | isSetCompatible (const RV_ShaderVariableSet &set) const |
| Return true if 'set' is compatable with the set layout in this shader. More... | |
| const RV_VKDescriptorSetInfo * | getSetInfo (int set_num) const |
| Query information on set 'set_num'. More... | |
| UT_UniquePtr < RV_ShaderVariableSet > | createSet (RV_Instance *inst, int set_num) const |
| Create a shader varaible set (descriptor set) for set 'set_num'. More... | |
| const RV_VKPipelineLayout & | getLayout () const |
| The layout of all sets and inputs of the shader. More... | |
| bool | hasBinding (const UT_StringRef &name) const |
| Query if a binding named 'name' exists. More... | |
| const RV_VKDescriptorBinding * | getBinding (int set, int binding) const |
| Return a binding at index 'binding' for set index 'set'. More... | |
| const RV_VKDescriptorBinding * | getBinding (const UT_StringRef &name) const |
| Return a binding for 'name'. More... | |
| const UT_Array< const RV_VKDescriptorBinding * > & | getBindingList () const |
| Return the list of set bindings. More... | |
| bool | hasUniform (const UT_StringRef &name) const |
| Query if the uniform named 'name' exists. More... | |
| const RV_Uniform * | getUniform (const UT_StringRef &name) const |
| Return type, size, and offset information about the uniform. More... | |
| const UT_Array< const RV_Uniform * > & | getUniformList () const |
| Return a list of all uniforms in this shader. More... | |
| bool | hasPushConstant (const UT_StringRef &name) const |
| Query if push constant with 'name' exists. More... | |
| const RV_Uniform * | getPushConstant (const UT_StringRef &name, int *opt_idx) const |
| Fetch the push constant 'name' with an optional array index. More... | |
| const UT_Array < RV_VKPushConstantRange > & | getPushConstantRanges () const |
| virtual void | print () const |
| Debug print message. More... | |
Static Protected Member Functions | |
| static RV_VKPipelineLayoutPtr | loadShaderProgram (RV_Instance *inst, const char *program, const char *extra_defines=nullptr) |
Protected Attributes | |
| UT_Array< RV_ShaderInput > | myInputs |
| UT_ArrayStringMap< int > | myInputTable |
| UT_UniquePtr< const RV_VKPipelineLayout > | myLayout |
| UT_SmallArray< exint, 8 *sizeof(exint)> | mySetLayoutIds |
| UT_Array< const RV_Uniform * > | myUniforms |
| UT_ArrayStringMap< int > | myUniformTable |
| Mapping of uniform names, to indices in myUniforms. More... | |
| UT_Array< const RV_VKDescriptorBinding * > | myBindings |
| UT_ArrayStringMap< std::pair < int, int > > | myBindingTable |
| mapping of binding name to set + binding number More... | |
| UT_Array< const RV_Uniform * > | myPushConstants |
| UT_ArrayStringMap< int > | myPushConstTable |
| UT_StringHolder | myName |
| friend | RV_Geometry |
| friend | RV_ShaderVariableSet |
class for shared functionality between different types of shaders: mainly accessing the the pipeline layout. Other shader types can build on extra functionality, e.g. input attributes for Graphics
Definition at line 85 of file RV_ShaderProgram.h.
| RV_ShaderProgramBase::RV_ShaderProgramBase | ( | RV_Instance * | inst, |
| RV_VKPipelineLayoutPtr | pipe_layout | ||
| ) |
|
virtual |
| UT_UniquePtr<RV_ShaderVariableSet> RV_ShaderProgramBase::createSet | ( | RV_Instance * | inst, |
| int | set_num | ||
| ) | const |
Create a shader varaible set (descriptor set) for set 'set_num'.
| const RV_VKDescriptorBinding* RV_ShaderProgramBase::getBinding | ( | int | set, |
| int | binding | ||
| ) | const |
Return a binding at index 'binding' for set index 'set'.
| const RV_VKDescriptorBinding* RV_ShaderProgramBase::getBinding | ( | const UT_StringRef & | name | ) | const |
Return a binding for 'name'.
| const UT_Array<const RV_VKDescriptorBinding*>& RV_ShaderProgramBase::getBindingList | ( | ) | const |
Return the list of set bindings.
|
inline |
The layout of all sets and inputs of the shader.
Definition at line 137 of file RV_ShaderProgram.h.
|
inline |
The number of descriptor sets in the shader.
Definition at line 107 of file RV_ShaderProgram.h.
| const RV_Uniform* RV_ShaderProgramBase::getPushConstant | ( | const UT_StringRef & | name, |
| int * | opt_idx | ||
| ) | const |
Fetch the push constant 'name' with an optional array index.
| const UT_Array<RV_VKPushConstantRange>& RV_ShaderProgramBase::getPushConstantRanges | ( | ) | const |
|
inline |
Query information on set 'set_num'.
Definition at line 123 of file RV_ShaderProgram.h.
|
pure virtual |
Type of shader - graphics or compute.
Implemented in RV_ShaderCompute, and RV_ShaderProgram.
| const RV_Uniform* RV_ShaderProgramBase::getUniform | ( | const UT_StringRef & | name | ) | const |
Return type, size, and offset information about the uniform.
| const UT_Array<const RV_Uniform*>& RV_ShaderProgramBase::getUniformList | ( | ) | const |
Return a list of all uniforms in this shader.
| bool RV_ShaderProgramBase::hasBinding | ( | const UT_StringRef & | name | ) | const |
Query if a binding named 'name' exists.
| bool RV_ShaderProgramBase::hasPushConstant | ( | const UT_StringRef & | name | ) | const |
Query if push constant with 'name' exists.
|
inline |
Query if set 'set_num' is used by the shader.
Definition at line 112 of file RV_ShaderProgram.h.
| bool RV_ShaderProgramBase::hasUniform | ( | const UT_StringRef & | name | ) | const |
Query if the uniform named 'name' exists.
| bool RV_ShaderProgramBase::isSetCompatible | ( | const RV_ShaderVariableSet & | set | ) | const |
Return true if 'set' is compatable with the set layout in this shader.
Get list of the descriptor set layout IDs in this shader, with -1 for indices that don't have a set
Definition at line 101 of file RV_ShaderProgram.h.
|
staticprotected |
|
inline |
Descriptive name of the shader.
Definition at line 94 of file RV_ShaderProgram.h.
|
inlinevirtual |
Debug print message.
Reimplemented in RV_ShaderCompute, and RV_ShaderProgram.
Definition at line 171 of file RV_ShaderProgram.h.
|
inline |
Set a descriptive name for the shader.
Definition at line 92 of file RV_ShaderProgram.h.
|
protected |
Definition at line 205 of file RV_ShaderProgram.h.
|
protected |
mapping of binding name to set + binding number
Definition at line 207 of file RV_ShaderProgram.h.
|
protected |
Definition at line 187 of file RV_ShaderProgram.h.
|
protected |
Definition at line 189 of file RV_ShaderProgram.h.
|
protected |
Definition at line 194 of file RV_ShaderProgram.h.
|
protected |
Definition at line 214 of file RV_ShaderProgram.h.
|
protected |
Definition at line 211 of file RV_ShaderProgram.h.
|
protected |
Definition at line 212 of file RV_ShaderProgram.h.
|
protected |
Definition at line 195 of file RV_ShaderProgram.h.
|
protected |
Definition at line 199 of file RV_ShaderProgram.h.
|
protected |
Mapping of uniform names, to indices in myUniforms.
Definition at line 201 of file RV_ShaderProgram.h.
|
protected |
Definition at line 216 of file RV_ShaderProgram.h.
|
protected |
Definition at line 217 of file RV_ShaderProgram.h.