summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-02-03 09:46:56 +1100
committerTimothy Arceri <[email protected]>2016-02-06 14:34:43 +1100
commitea7f64f74d0910f72730849d3081ae8a62cc28d4 (patch)
tree684af8ecaa1a00e7416327b946862fb29023572b /src/compiler
parentc1bbaff1e83f901d67d78f9e1ddfe8291dd09bfa (diff)
glsl: don't generate transform feedback candidate when not required
If we are not even looking for one don't bother generating a candidate list. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/link_varyings.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index 535c83cd0e7..590de174507 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -1643,8 +1643,10 @@ assign_varying_locations(struct gl_context *ctx,
(output_var->data.stream < MAX_VERTEX_STREAMS &&
producer->Stage == MESA_SHADER_GEOMETRY));
- tfeedback_candidate_generator g(mem_ctx, tfeedback_candidates);
- g.process(output_var);
+ if (num_tfeedback_decls > 0) {
+ tfeedback_candidate_generator g(mem_ctx, tfeedback_candidates);
+ g.process(output_var);
+ }
ir_variable *const input_var =
linker::get_matching_input(mem_ctx, output_var, consumer_inputs,