[03/13] nir: do not remove varyings used for transform feedback

Submitted by Jason Ekstrand on Oct. 13, 2018, 1:09 p.m.

Details

Message ID 20181013131000.29394-4-jason.ekstrand@intel.com
State New
Headers show
Series "anv: Add support for VK_EXT_transform_feedback" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Jason Ekstrand Oct. 13, 2018, 1:09 p.m.
From: Samuel Pitoiset <samuel.pitoiset@gmail.com>

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>
---
 src/compiler/nir/nir_linking_helpers.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c
index 85712a7cb1c..a710ba3da25 100644
--- a/src/compiler/nir/nir_linking_helpers.c
+++ b/src/compiler/nir/nir_linking_helpers.c
@@ -112,6 +112,9 @@  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))) {