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<unsigned> set_remap(remap_names, 1);
SetForScope<string> set_prefix(remap_prefix, target_func.name);
variable_map.clear();
--- /dev/null
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+layout(location=1) in float scale;
+layout(location=2) in float size;
+float get_scale()
+{
+ float s = scale*2.0;
+ return s*s;
+}
+float get_size()
+{
+ float s = size*0.5;
+ return s*s;
+}
+void main()
+{
+ gl_Position = position*get_scale()*get_size();
+}
+
+/* Expected output: vertex
+layout(location=0) in vec4 position;
+layout(location=1) in float scale;
+layout(location=2) in float size;
+void main()
+{
+ float s = scale*2.0;
+ float _get_size_s = size*0.5;
+ gl_Position = position*s*s*_get_size_s*_get_size_s;
+}
+*/
--- /dev/null
+#pragma MSP stage(vertex)
+layout(location=0) in vec4 position;
+layout(location=1) in float scale;
+vec4 get_position()
+{
+ return position;
+}
+float get_scale()
+{
+ return scale;
+}
+void main()
+{
+ gl_Position = get_position()*get_scale();
+}
+
+/* Expected output: vertex
+layout(location=0) in vec4 position;
+layout(location=1) in float scale;
+void main()
+{
+ gl_Position = position*scale;
+}
+*/