glsl: don't incorrectly eliminate patches with explicit locations
authorTimothy Arceri <timothy.arceri@collabora.com>
Tue, 17 May 2016 01:34:38 +0000 (11:34 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Tue, 17 May 2016 05:06:21 +0000 (15:06 +1000)
These varying have a separate location domain from per-vertex varyings
and need to be handled separately.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/compiler/glsl/linker.cpp

index bf30b82b4028a07dae79576d72ed5f350918d2c9..70c6317ca6a8e6810cb2db4d5e9bc14bf72413d3 100644 (file)
@@ -2888,7 +2888,8 @@ match_explicit_outputs_to_inputs(struct gl_shader_program *prog,
                                  gl_shader *consumer)
 {
    glsl_symbol_table parameters;
-   ir_variable *explicit_locations[MAX_VARYING][4] = { {NULL, NULL} };
+   ir_variable *explicit_locations[MAX_VARYINGS_INCL_PATCH][4] =
+      { {NULL, NULL} };
 
    /* Find all shader outputs in the "producer" stage.
     */