HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RV_VKShaderModule.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: RV_VKShaderModule.h ( RV Library, C++)
7  *
8  * COMMENTS:
9  * Shader Modules for Vulkan Pipelines
10  */
11 
12 #ifndef RV_VKShaderModule_h
13 #define RV_VKShaderModule_h
14 
15 #include "RV_API.h"
16 
17 #include <UT/UT_String.h>
18 
19 #include "RV_VK.h"
20 #include "RV_Instance.h"
21 #include "RV_VKEnum.h"
22 #include "RV_VKShaderReflect.h"
23 
25 {
26 public:
27  static RV_VKShaderModule* createModule(
28  RV_Instance* inst,
29  const UT_String &name,
31  const UT_Array<uint8_t>& src);
32 
33  VkShaderModule getVkShaderModule() const { return myVkModule; }
34  VkShaderStageFlagBits getStage() const { return myStage; }
35  RV_VKShaderReflect& getReflection() const { return *myReflection; }
36  const UT_Array<uint8_t>& getBinary() const { return myBinary; }
37 
39  RV_VKShaderModule(const RV_VKShaderModule&) = delete;
40 
41 protected:
43  RV_Instance* inst,
44  const UT_String &name,
47  VkShaderModule vk_module);
48  VkShaderModule myVkModule = VK_NULL_HANDLE;
50 
51  RV_Instance* myInst = nullptr;
52 
56 
57  friend class RV_VKShaderReflect;
58 };
59 
60 
62  RV_Instance* inst,
63  const UT_StringHolder& name,
65  const char* filename);
66 
67 #endif
RV_VKShaderReflect & getReflection() const
GT_API const UT_StringHolder filename
#define VK_NULL_HANDLE
Definition: vulkan_core.h:45
const GLuint GLenum const void * binary
Definition: glcorearb.h:1924
VkShaderStageFlagBits getStage() const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
#define RV_API
Definition: RV_API.h:10
UT_UniquePtr< RV_VKShaderReflect > myReflection
VkShaderStageFlagBits
Definition: vulkan_core.h:2594
GLuint const GLchar * name
Definition: glcorearb.h:786
UT_Array< uint8_t > myBinary
const UT_Array< uint8_t > & getBinary() const
Handle to the main interface of Vulkan.
Definition: RV_Instance.h:36
VkShaderModule getVkShaderModule() const
RV_API class RV_VKShaderModule * RVloadShaderFileSource(RV_Instance *inst, const UT_StringHolder &name, VkShaderStageFlagBits stage, const char *filename)
GLenum src
Definition: glcorearb.h:1793