diff options
author | Eric Anholt <[email protected]> | 2010-07-13 11:07:16 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-07-13 11:07:16 -0700 |
commit | c10a68522c400d48553dbd473b9778140842d9dd (patch) | |
tree | 5e62537cf0d0d60cf63047a39d6dc1439efaeaae /src/glsl/linker.cpp | |
parent | 4d5da50b94115d055ba8d0ff8717054582665384 (diff) |
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).
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r-- | src/glsl/linker.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 90dc97bc535..c71c07d6e97 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -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) { |