HDK
|
Compute shader object. More...
#include <RV_ShaderProgram.h>
Public Member Functions | |
RV_ShaderType | getShaderType () const override |
Type of shader - graphics or compute. More... | |
bool | prepareForDraw (RV_Instance *inst, RV_VKCommandBuffer *cb) |
void | print () const override |
Debug print message. More... | |
Public Member Functions inherited from RV_ShaderProgramBase | |
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... | |
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 |
Static Public Member Functions | |
static RV_ShaderCompute * | loadShaderProgram (RV_Instance *inst, const char *program, const char *extra_defines=nullptr) |
static RV_ShaderCompute * | createShaderProgram (RV_Instance *inst, RV_VKShader &shader) |
Create Shader using GLSL to SPIR-V compiler object. More... | |
static RV_ShaderCompute * | createShaderProgram (RV_Instance *inst, const UT_StringArray &filenames) |
Create Shader using list of SPIR-V binary filenames. More... | |
static RV_ShaderCompute * | createShaderProgram (RV_Instance *inst, UT_Array< UT_UniquePtr< RV_VKShaderModule >> &rv_modules) |
Create Shader using list of SPIR-V module filenames. More... | |
Protected Member Functions | |
RV_ShaderCompute (RV_Instance *inst, RV_VKPipelineLayoutPtr pipe_layout, RV_VKPipelinePtr pipeline) | |
Static Protected Member Functions | |
static RV_ShaderCompute * | createShaderProgram (RV_Instance *inst, RV_VKPipelineLayoutPtr layout) |
Static Protected Member Functions inherited from RV_ShaderProgramBase | |
static RV_VKPipelineLayoutPtr | loadShaderProgram (RV_Instance *inst, const char *program, const char *extra_defines=nullptr) |
static RV_VKPipelineLayoutPtr | createShaderProgram (RV_Instance *inst, RV_VKShader &shader, const char *name=nullptr) |
static RV_VKPipelineLayoutPtr | createShaderProgram (RV_Instance *inst, const UT_StringArray &filenames, const char *name=nullptr) |
Protected Attributes | |
UT_UniquePtr< RV_VKPipeline > | myPipeline |
Protected Attributes inherited from RV_ShaderProgramBase | |
UT_Array< RV_ShaderInput > | myInputs |
UT_ArrayStringMap< int > | myInputTable |
UT_UniquePtr< const RV_VKPipelineLayout > | myLayout |
UT_Array< 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 |
Compute shader object.
Definition at line 377 of file RV_ShaderProgram.h.
|
protected |
|
static |
Create Shader using GLSL to SPIR-V compiler object.
|
static |
Create Shader using list of SPIR-V binary filenames.
|
static |
Create Shader using list of SPIR-V module filenames.
|
staticprotected |
|
inlineoverridevirtual |
Type of shader - graphics or compute.
Implements RV_ShaderProgramBase.
Definition at line 403 of file RV_ShaderProgram.h.
|
static |
or compiling if no spir-v found, and sources have been copied to hfs NOTE: providing extra defines forces compilation
bool RV_ShaderCompute::prepareForDraw | ( | RV_Instance * | inst, |
RV_VKCommandBuffer * | cb | ||
) |
|
overridevirtual |
Debug print message.
Reimplemented from RV_ShaderProgramBase.
|
protected |
Definition at line 425 of file RV_ShaderProgram.h.