nir: add new linking opt nir_link_constant_varyings()

This pass moves constant outputs to the consuming shader stage
where possible.

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Timothy Arceri
2018-11-09 09:24:11 +11:00
parent 414470854d
commit d40dd05553
2 changed files with 111 additions and 0 deletions

View File

@@ -2813,6 +2813,7 @@ bool nir_remove_unused_io_vars(nir_shader *shader, struct exec_list *var_list,
void nir_compact_varyings(nir_shader *producer, nir_shader *consumer,
bool default_to_smooth_interp);
void nir_link_xfb_varyings(nir_shader *producer, nir_shader *consumer);
bool nir_link_constant_varyings(nir_shader *producer, nir_shader *consumer);
typedef enum {
/* If set, this forces all non-flat fragment shader inputs to be