]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/finalize.h
Fix a name conflict in certain inlining scenarios
[libs/gl.git] / source / glsl / finalize.h
index 1743074849831066a4ff038b093c67b75496395a..f9502954f6b1d6ed9983e403c14414870ae63090 100644 (file)
@@ -29,13 +29,13 @@ class LocationAllocator: private TraversingVisitor
 private:
        struct Uniform
        {
-               int location;
-               int desc_set;
-               int bind_point;
-
-               Uniform(): location(-1), desc_set(-1), bind_point(-1) { }
+               int location = -1;
+               int desc_set = 0;
+               int bind_point = -1;
        };
 
+       Features features;
+       bool alloc_new = true;
        std::map<std::string, std::set<unsigned> > used_locations;
        std::map<std::string, Uniform> uniforms;
        std::map<unsigned, std::set<unsigned> > used_bindings;
@@ -44,13 +44,12 @@ private:
        std::vector<InterfaceBlock *> unbound_blocks;
 
 public:
-       void apply(Module &, const Features &);
+       void apply(Module &, const Features &, bool = true);
 private:
        void apply(Stage &);
 
        void allocate_locations(const std::string &);
        void bind_uniform(RefPtr<Layout> &, const std::string &, unsigned);
-       void add_layout_value(RefPtr<Layout> &, const std::string &, unsigned);
 
        bool visit_uniform(const std::string &, RefPtr<Layout> &);
        virtual void visit(VariableDeclaration &);