summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_linking_helpers.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2018-05-11 10:29:17 +0200
committerJason Ekstrand <[email protected]>2019-01-22 10:42:56 -0600
commit9f4e0aa7c1f9d71e6716295a1ee5b78e70ed6f37 (patch)
tree00fd8f8da66afa171a4223221772d85d3cc063fb /src/compiler/nir/nir_linking_helpers.c
parent9c14440e8194acaa92cf0edb751700b94570ec3b (diff)
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 <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_linking_helpers.c')
-rw-r--r--src/compiler/nir/nir_linking_helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c
index 8e67e84b588..aaa4204cce9 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))) {