HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RV_VKShaderReflect.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_VKShaderReflect.h ( RV Library, C++)
7  *
8  * COMMENTS:
9  * Shader Reflection for SPIR-V modules
10  */
11 
12 #ifndef RV_VKShaderReflect_h
13 #define RV_VKShaderReflect_h
14 
15 #include "RV_API.h"
16 
17 #include "RV_VKPipelineLayout.h" // for RV_VKPushConstantInfo
18 
20 
21 #include <UT/UT_Array.h>
22 #include <UT/UT_UniquePtr.h>
23 
24 struct RV_SpvReflectionImpl;
27 
29 {
30 public:
34 
35  RV_VKShaderReflect(const RV_VKShaderReflect& ) = delete;
36 
37  // Get Descriptor Layouts
38  UT_Array<RV_VKDescriptorSetInfo> getDescriptorLayouts();
39 
40  // Get shader stage input variables
41  UT_Array<RV_VKAttributeInfo> getInputs();
42 
43  // Get shader stage output variables
44  UT_Array<RV_VKAttributeInfo> getOutputs();
45 
46  // get Push constant ranges
47  RV_VKPushConstantInfo getPushConstants();
48 
49  // get required Vulkan features to use shader
50  VE_PhysicalDeviceFeatures getRequiredFeatures();
51 
52  // set required Vulkan features in passed in struct
53  void getRequiredFeatures(VE_PhysicalDeviceFeatures &feat);
54 
55  // Get the local work group size for compute shaders,
56  // or the ids if they are declared as specialization
57  // constants. Sets `is_id` true if the values are ids.
58  // returns false if the shader is not compute
59  bool getLocalWorkGroupSize(int32& x, int32& y, int32& z, bool& is_id);
60 
61 #if 0
62  // Get shader stage output variables
63  void* RV_VKShaderReflect::getShaderOutputs();
64  // get Specialization Constants
65  void* RV_VKShaderReflect::getShaderSpecConstants();
66 #endif
67 
68 private:
70  friend RV_SpvReflectionImpl;
71 };
72 
73 #endif
int int32
Definition: SYS_Types.h:39
const GLuint GLenum const void * binary
Definition: glcorearb.h:1924
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:848
GLint y
Definition: glcorearb.h:103
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
VkShaderStageFlagBits
Definition: vulkan_core.h:2594
GLint GLenum GLint x
Definition: glcorearb.h:409
Info loaded from file, used to create VK Shader Module.