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@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Samuel Pitoiset
2018-05-11 10:29:17 +02:00
committed by Jason Ekstrand
parent 9c14440e81
commit 9f4e0aa7c1
+3
View 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))) {