nir: do not remove varyings used for transform feedback
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 11 May 2018 08:29:17 +0000 (10:29 +0200)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 22 Jan 2019 16:42:56 +0000 (10:42 -0600)
When a xfb buffer is explicitely declared on a varying
variable, we shouldn't remove it at link time.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_linking_helpers.c

index 8e67e84b58827fb89de05edcbc42570328056563..aaa4204cce9aff02c9a8543d2477a91ce5c49d4b 100644 (file)
@@ -128,6 +128,9 @@ nir_remove_unused_io_vars(nir_shader *shader, struct exec_list *var_list,
       if (var->data.always_active_io)
          continue;
 
+      if (var->data.explicit_xfb_buffer)
+         continue;
+
       uint64_t other_stage = used[var->data.location_frac];
 
       if (!(other_stage & get_variable_io_mask(var, shader->info.stage))) {