glsl: mark xfb varyings as always active
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 12 Sep 2017 03:18:29 +0000 (13:18 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 26 Sep 2017 12:37:02 +0000 (22:37 +1000)
This will be used by the nir linking pass so that we don't remove
otherwise unused varyings.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
src/compiler/glsl/link_varyings.cpp

index 528506fd0eb09076e04c2d13c7ce9de38fe776a8..656bf79ca9df88bf7baee3c48378209b9b54437d 100644 (file)
@@ -2268,6 +2268,9 @@ assign_varying_locations(struct gl_context *ctx,
          return false;
       }
 
+      /* Mark xfb varyings as always active */
+      matched_candidate->toplevel_var->data.always_active_io = 1;
+
       if (matched_candidate->toplevel_var->data.is_unmatched_generic_inout) {
          matched_candidate->toplevel_var->data.is_xfb_only = 1;
          matches.record(matched_candidate->toplevel_var, NULL);