]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/module.h
Reflect builtin decorators from SPIR-V modules
[libs/gl.git] / source / core / module.h
index 7713d3ce0a77a79af54b61298868a31b24c77d1a..9ac54d328ee42a86b97fed32e82383a171138739 100644 (file)
@@ -79,6 +79,15 @@ public:
                OUTPUT = 3
        };
 
+       enum BuiltinSemantic
+       {
+               NOT_BUILTIN = -1,
+               POSITION = 0,
+               CLIP_DISTANCE = 3,
+               LAYER = 9,
+               FRAG_DEPTH = 22
+       };
+
        struct Constant;
        struct Structure;
        struct Variable;
@@ -100,6 +109,7 @@ public:
                const Constant *array_size_spec = 0;
                unsigned array_stride = 0;
                unsigned matrix_stride = 0;
+               BuiltinSemantic builtin = NOT_BUILTIN;
        };
 
        struct Structure
@@ -120,6 +130,7 @@ public:
                int location = -1;
                int descriptor_set = -1;
                int binding = -1;
+               BuiltinSemantic builtin = NOT_BUILTIN;
 
                bool operator==(const Variable &) const;
        };