]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/reflectdata.h
Fix reflection of image types from Spir-V modules
[libs/gl.git] / source / core / reflectdata.h
index fff190a52dcbde157e98f042e7ead8534d42713b..a89e7fcf2972c973c89a803501ebbd6739f7f11c 100644 (file)
@@ -14,6 +14,12 @@ Reflection data for shader programs.
 */
 struct ReflectData
 {
+       enum
+       {
+               DEFAULT_BLOCK = -1,
+               PUSH_CONSTANT = -2
+       };
+
        typedef unsigned LayoutHash;
        struct UniformBlockInfo;
 
@@ -38,7 +44,7 @@ struct ReflectData
        {
                std::string name;
                unsigned data_size = 0;
-               int bind_point = -1;
+               int bind_point = DEFAULT_BLOCK;
                std::vector<const UniformInfo *> uniforms;
                LayoutHash layout_hash = 0;
 
@@ -49,15 +55,17 @@ struct ReflectData
        struct AttributeInfo
        {
                std::string name;
-               unsigned location = -1;
+               int location = -1;
                unsigned array_size = 0;
                DataType type = VOID;
        };
 
        std::vector<UniformBlockInfo> uniform_blocks;
        std::vector<UniformInfo> uniforms;
-       LayoutHash layout_hash;
+       LayoutHash layout_hash = 0;
        std::vector<AttributeInfo> attributes;
+       unsigned n_clip_distances = 0;
+       unsigned n_descriptor_sets = 0;
 
        void update_layout_hash();
 };