projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d5da50
)
glsl2: When linking makes a variable not a varying output, make it ir_var_auto.
author
Eric Anholt
<eric@anholt.net>
Tue, 13 Jul 2010 18:07:16 +0000
(11:07 -0700)
committer
Eric Anholt
<eric@anholt.net>
Tue, 13 Jul 2010 18:07:16 +0000
(11:07 -0700)
This almost fixes glsl-unused-varying, except that the used varying
gets assigned to the first varying slot (position).
src/glsl/linker.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/linker.cpp
b/src/glsl/linker.cpp
index 90dc97bc53537f5651a3a0c60149533bafe81428..c71c07d6e97fef3912f62757e2ebc6a9bbdc4f0a 100644
(file)
--- 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) {