aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-02-27 10:45:05 +0100
committermarha <marha@users.sourceforge.net>2013-02-27 10:45:05 +0100
commitc74ef795c7282681616decc36a9a81cd1b1b6ec7 (patch)
treebeb5f13ba78bd7920eae918b6aa5db5bac83f0da /mesalib/src/glsl
parentf51268259621a21d14e40b8a41c5803a5c2ce706 (diff)
downloadvcxsrv-c74ef795c7282681616decc36a9a81cd1b1b6ec7.tar.gz
vcxsrv-c74ef795c7282681616decc36a9a81cd1b1b6ec7.tar.bz2
vcxsrv-c74ef795c7282681616decc36a9a81cd1b1b6ec7.zip
libX11 mesa pixman xkeyboard-config
xkeyboard-config commit 9993f996e75232385b19cc5078f7fecde6b399b9 libX11 commit b687440c28c7da6ee0ae44514d20248db5161606 pixman commit 2156fb51b353867d5a18b734690ca551f74d4fb1 mesa commit f987d23b28491bd7b0552bd9daffa53a8e073c71
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r--mesalib/src/glsl/link_varyings.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/mesalib/src/glsl/link_varyings.cpp b/mesalib/src/glsl/link_varyings.cpp
index b1317c832..616933dfd 100644
--- a/mesalib/src/glsl/link_varyings.cpp
+++ b/mesalib/src/glsl/link_varyings.cpp
@@ -964,6 +964,8 @@ assign_varying_locations(struct gl_context *ctx,
varying_matches matches(ctx->Const.DisableVaryingPacking);
hash_table *tfeedback_candidates
= hash_table_ctor(0, hash_table_string_hash, hash_table_string_compare);
+ hash_table *consumer_inputs
+ = hash_table_ctor(0, hash_table_string_hash, hash_table_string_compare);
/* Operate in a total of three passes.
*
@@ -976,6 +978,18 @@ assign_varying_locations(struct gl_context *ctx,
* not being inputs. This lets the optimizer eliminate them.
*/
+ if (consumer) {
+ foreach_list(node, consumer->ir) {
+ ir_variable *const input_var =
+ ((ir_instruction *) node)->as_variable();
+
+ if ((input_var != NULL) && (input_var->mode == ir_var_shader_in)) {
+ hash_table_insert(consumer_inputs, input_var,
+ ralloc_strdup(mem_ctx, input_var->name));
+ }
+ }
+ }
+
foreach_list(node, producer->ir) {
ir_variable *const output_var = ((ir_instruction *) node)->as_variable();
@@ -986,7 +1000,7 @@ assign_varying_locations(struct gl_context *ctx,
g.process(output_var);
ir_variable *input_var =
- consumer ? consumer->symbols->get_variable(output_var->name) : NULL;
+ (ir_variable *) hash_table_find(consumer_inputs, output_var->name);
if (input_var && input_var->mode != ir_var_shader_in)
input_var = NULL;
@@ -1005,6 +1019,7 @@ assign_varying_locations(struct gl_context *ctx,
if (matched_candidate == NULL) {
hash_table_dtor(tfeedback_candidates);
+ hash_table_dtor(consumer_inputs);
return false;
}
@@ -1021,11 +1036,13 @@ assign_varying_locations(struct gl_context *ctx,
if (!tfeedback_decls[i].assign_location(ctx, prog)) {
hash_table_dtor(tfeedback_candidates);
+ hash_table_dtor(consumer_inputs);
return false;
}
}
hash_table_dtor(tfeedback_candidates);
+ hash_table_dtor(consumer_inputs);
if (ctx->Const.DisableVaryingPacking) {
/* Transform feedback code assumes varyings are packed, so if the driver