Mesa (master): nir: do not remove varyings used for transform feedback

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 22 16:43:34 UTC 2019


Module: Mesa
Branch: master
Commit: 9f4e0aa7c1f9d71e6716295a1ee5b78e70ed6f37
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f4e0aa7c1f9d71e6716295a1ee5b78e70ed6f37

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Fri May 11 10:29:17 2018 +0200

nir: do not remove varyings used for transform feedback

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 at gmail.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/compiler/nir/nir_linking_helpers.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c
index 8e67e84b58..aaa4204cce 100644
--- a/src/compiler/nir/nir_linking_helpers.c
+++ b/src/compiler/nir/nir_linking_helpers.c
@@ -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))) {




More information about the mesa-commit mailing list