From 45ef10c06a3010a0710f9db3e980fde545157b6a Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 7 Sep 2017 23:27:59 +1000 Subject: nir: add some helpers for doing linking The initial helpers add support for removing unused varyings between stages. V2: - Moved the io mask helper function into this file rather than nir.h so it's not used elsewhere considering it doesn't handle all corner cases. - Use bitmask rather than hash table to handle tcs outputs (Ken) Reviewed-by: Kenneth Graunke --- src/compiler/nir/nir.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/compiler/nir/nir.h') diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index fab2110f619..bb5aba605a1 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2417,6 +2417,9 @@ void nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint); void nir_assign_var_locations(struct exec_list *var_list, unsigned *size, int (*type_size)(const struct glsl_type *)); +/* Some helpers to do very simple linking */ +bool nir_remove_unused_varyings(nir_shader *producer, nir_shader *consumer); + typedef enum { /* If set, this forces all non-flat fragment shader inputs to be * interpolated as if with the "sample" qualifier. This requires -- cgit v1.2.3