X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Foptimize.cpp;h=2a9bfb17273aa743c7dd7af8608065f7b66058a0;hp=c4118dee205d09f2f84c1e468001b6c6706de1c9;hb=e76de6e7ba324194716b8a40d83353a4c1dc824c;hpb=3f44e477f81983c66947fe8a6d8640a3b2f9e0b3 diff --git a/source/glsl/optimize.cpp b/source/glsl/optimize.cpp index c4118dee..2a9bfb17 100644 --- a/source/glsl/optimize.cpp +++ b/source/glsl/optimize.cpp @@ -90,6 +90,9 @@ const string &InlineContentInjector::apply(Stage &stage, FunctionDeclaration &ta inlined.push_back(r_inlined_statement); } + // Insert the variables here to enable further inlinings to avoid conflicts. + tgt_blk.variables.insert(variable_map.begin(), variable_map.end()); + SetForScope set_remap(remap_names, 1); SetForScope set_prefix(remap_prefix, target_func.name); variable_map.clear();