X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fgenerate.cpp;h=3175c6c9f206fd0c64b4eb130dc461d6979865cb;hb=0d5ff7918d50092d8cf2e1b8f7af1d7d29b6eb9b;hp=c82d1c6c58e4a59ef025fa3cf3f13c80b580342c;hpb=8c379c40892fc0e11cf2d40f4784c6e6aa1a12d7;p=libs%2Fgl.git diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index c82d1c6c..3175c6c9 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -22,7 +22,7 @@ void ConstantIdAssigner::apply(Module &module, const Features &features) id = j->second; else { - id = hash32(v->name)%features.constant_id_range; + id = hash<32>(v->name)%features.constant_id_range; while(used_ids.count(id)) id = (id+1)%features.constant_id_range; } @@ -32,6 +32,7 @@ void ConstantIdAssigner::apply(Module &module, const Features &features) i->value = id; used_ids.insert(id); + existing_constants[v->name] = id; } }