X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fgenerate.h;h=eb7d488ae6071faa619f3e374c61084686e028b9;hb=b7ecc29c204faede028556d1942b2d61d5cda9ee;hp=ef8ca10e35b198b5da4a38abc09708b08455f267;hpb=bbe2fb7bc1384d7683f1795b5cfa9168df18c580;p=libs%2Fgl.git diff --git a/source/glsl/generate.h b/source/glsl/generate.h index ef8ca10e..eb7d488a 100644 --- a/source/glsl/generate.h +++ b/source/glsl/generate.h @@ -11,18 +11,15 @@ namespace Msp { namespace GL { namespace SL { -/** Manipulates specialization constants. If values are specified, turns -specialization constants into normal constants. Without values assigns -automatic constant_ids to specialization constants. */ -class ConstantSpecializer: private TraversingVisitor +/** Assigns IDs to specialization constants with an automatic ID. */ +class ConstantIdAssigner: private TraversingVisitor { private: - const std::map *values; + std::set used_ids; + std::vector auto_constants; public: - ConstantSpecializer(); - - void apply(Stage &, const std::map *); + void apply(Module &, const Features &); private: virtual void visit(VariableDeclaration &);