-#ifndef MSP_GL_SL_COMPATIBILITY_H_
-#define MSP_GL_SL_COMPATIBILITY_H_
+#ifndef MSP_GL_SL_FINALIZE_H_
+#define MSP_GL_SL_FINALIZE_H_
#include <string>
#include "visitor.h"
namespace GL {
namespace SL {
+/** Assigns offset layout qualifiers to struct members. */
+class StructOrganizer: private TraversingVisitor
+{
+private:
+ int offset;
+
+public:
+ StructOrganizer();
+
+ void apply(Stage &s) { s.content.visit(*this); }
+
+private:
+ virtual void visit(StructDeclaration &);
+ virtual void visit(VariableDeclaration &);
+};
+
+/** Assigns location and binding layout qualifiers to interface variables and
+blocks. */
class LocationAllocator: private TraversingVisitor
{
private: