14 #ifndef RV_ShaderProgram_h
15 #define RV_ShaderProgram_h
78 : myName(name), myLocation(location)
79 , myType(type), myVecSize(vec_size)
92 : myDefaultAttributes(0)
131 int getMaxSetNumber()
const;
134 bool hasSet(
int set_num)
const;
195 const char* extra_defines =
nullptr);
271 const char* extra_defines =
nullptr);
277 const char*
name =
nullptr);
283 const char*
name =
nullptr);
289 const char*
name =
nullptr);
322 int& out_vec_size)
const;
336 void print()
const override;
352 const PipelineCache &cache,
357 PipelineCache &cache,
362 PipelineCache myMainPipelineCache;
363 PipelineCache myThreadedPipelineCache;
395 const char* extra_defines =
nullptr);
424 bool hasWorkGroupSpecializationConst()
const;
431 void print()
const override;
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
UT_Array< const RV_VKDescriptorBinding * > myBindings
UT_Array< RV_ShaderInput > myInputs
RV_ShaderType getShaderType() const override
Type of the shader, Graphics or Compute.
Object that represents drawable geometry. This object holds vertex, instancing and index buffers for ...
std::tuple< Types...> UT_Tuple
UT_ArrayStringMap< int > myInputTable
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
const UT_StringHolder & name() const
Descriptive name of the shader.
GLint GLint GLsizei GLint GLenum GLenum type
friend RV_ShaderVariableSet
static RV_VKPipelineLayoutPtr loadShaderProgram(RV_Instance *inst, const char *program, const char *extra_defines=nullptr)
constexpr auto set(type rhs) -> int
RAII wrapper class for VkPipeline.
const UT_Array< exint > & layoutIds() const
RV_API RV_VKDescriptorBinding loadShaderBlock(RV_Instance *inst, const char *block, int set=0, int binding_num=0)
UT_ArrayStringMap< int > myUniformTable
Mapping of uniform names, to indices in myUniforms.
UT_ArrayStringMap< std::pair< int, int > > myBindingTable
mapping of binding name to set + binding number
GLuint const GLchar * name
UT_UniquePtr< const RV_VKPipelineLayout > myLayout
virtual void print() const
Debug print message.
Handle to the main interface of Vulkan.
const RV_ShaderInputState & getInputState() const
The list and state of vertex shader inputs (attributes)
RAII wrapper class for Vk Shader Module.
void setName(const UT_StringHolder &name)
Set a descriptive name for the shader.
UT_Array< const RV_Uniform * > myPushConstants
UT_SmallArray< exint, 8 *sizeof(exint)> mySetLayoutIds
UT_UniquePtr< RV_VKPipelineLayout > RV_VKPipelineLayoutPtr
UT_ArrayStringMap< int > myPushConstTable
UT_UniquePtr< RV_VKPipeline > myPipeline
const RV_VKPipelineLayout & getLayout() const
The layout of all sets and inputs of the shader.
UT_UniquePtr< RV_VKPipeline > RV_VKPipelinePtr
UT_Array< const RV_Uniform * > myUniforms
GLbitfield GLuint program
RV_API RV_VKDescriptorBinding loadShaderSnippet(RV_Instance *inst, const char *code, const char *name, int set=0, int binding_num=0)
const UT_Array< RV_ShaderInput > & getAttributeList() const
The list of vertex shader inputs (attributes)
RV_ShaderType getShaderType() const override
Type of shader - graphics or compute.