glsl2: When linking makes a variable not a varying output, make it ir_var_auto.

This almost fixes glsl-unused-varying, except that the used varying
gets assigned to the first varying slot (position).
This commit is contained in:
Eric Anholt
2010-07-13 11:07:16 -07:00
parent 4d5da50b94
commit c10a68522c

View File

@@ -1052,7 +1052,10 @@ assign_varying_locations(gl_shader *producer, gl_shader *consumer)
/* An 'out' variable is only really a shader output if its value is read
* by the following stage.
*/
var->shader_out = (var->location != -1);
if (var->location == -1) {
var->shader_out = false;
var->mode = ir_var_auto;
}
}
foreach_list(node, consumer->ir) {