]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/module.h
Support compute shaders and compute operations
[libs/gl.git] / source / core / module.h
index 51924d606668db500e7b871f72f7677ae538190d..480a0669ffbb6275324a7ab2b3c5bb660fdba2eb 100644 (file)
@@ -61,6 +61,9 @@ private:
        virtual void compile(SL::Compiler &) = 0;
 
        SL::Features create_features() const;
+
+public:
+       virtual void set_debug_name(const std::string &) { }
 };
 
 /**
@@ -101,7 +104,8 @@ public:
        {
                VERTEX = 0,
                GEOMETRY = 3,
-               FRAGMENT = 4
+               FRAGMENT = 4,
+               COMPUTE = 5
        };
 
        enum StorageClass
@@ -132,6 +136,7 @@ public:
                unsigned id = 0;
                Stage stage = VERTEX;
                std::vector<const Variable *> globals;
+               LinAl::Vector<unsigned, 3> compute_local_size;
        };
 
        struct StructMember
@@ -225,6 +230,7 @@ private:
                void reflect_name(CodeIterator);
                void reflect_member_name(CodeIterator);
                void reflect_entry_point(CodeIterator);
+               void reflect_execution_mode(CodeIterator);
                void reflect_void_type(CodeIterator);
                void reflect_bool_type(CodeIterator);
                void reflect_int_type(CodeIterator);
@@ -278,6 +284,9 @@ public:
 private:
        std::vector<const InstructionBlock *> collect_visited_blocks(const std::map<unsigned, int> &) const;
        void collect_visited_blocks(unsigned, std::vector<std::uint8_t> &) const;
+
+public:
+       void set_debug_name(const std::string &n) { SpirVModuleBackend::set_debug_name(n); }
 };
 
 } // namespace GL