glsl: move lowering after matching validation
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 23 Dec 2015 03:11:04 +0000 (14:11 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Tue, 5 Jan 2016 23:52:54 +0000 (10:52 +1100)
After lowering the matching flag is_unmatched_generic_inout is lost so
we need to move this validation before lowering.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
src/glsl/link_varyings.cpp

index 1ff25b852530e6d9a470c62e9f3150d20ea36ac1..6119eff2fa31a4bd51303cc72d9f449479bfeced 100644 (file)
@@ -1629,17 +1629,6 @@ assign_varying_locations(struct gl_context *ctx,
    hash_table_dtor(consumer_inputs);
    hash_table_dtor(consumer_interface_inputs);
 
-   if (!disable_varying_packing) {
-      if (producer) {
-         lower_packed_varyings(mem_ctx, slots_used, ir_var_shader_out,
-                               0, producer);
-      }
-      if (consumer) {
-         lower_packed_varyings(mem_ctx, slots_used, ir_var_shader_in,
-                               consumer_vertices, consumer);
-      }
-   }
-
    if (consumer && producer) {
       foreach_in_list(ir_instruction, node, consumer->ir) {
          ir_variable *const var = node->as_variable();
@@ -1689,6 +1678,17 @@ assign_varying_locations(struct gl_context *ctx,
       }
    }
 
+   if (!disable_varying_packing) {
+      if (producer) {
+         lower_packed_varyings(mem_ctx, slots_used, ir_var_shader_out,
+                               0, producer);
+      }
+      if (consumer) {
+         lower_packed_varyings(mem_ctx, slots_used, ir_var_shader_in,
+                               consumer_vertices, consumer);
+      }
+   }
+
    return true;
 }