[Mesa-dev] [PATCH 5/6] nir: add component level support to remove_unused_io_vars()

Eric Anholt eric at anholt.net
Mon Oct 9 22:28:51 UTC 2017


Timothy Arceri <tarceri at itsqueeze.com> writes:

> ---
>  src/compiler/nir/nir_linking_helpers.c | 37 +++++++++++++++++++---------------
>  1 file changed, 21 insertions(+), 16 deletions(-)
>
> diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c
> index 838054e42a4..28141a6ec89 100644
> --- a/src/compiler/nir/nir_linking_helpers.c
> +++ b/src/compiler/nir/nir_linking_helpers.c
> @@ -56,11 +56,9 @@ get_variable_io_mask(nir_variable *var, gl_shader_stage stage)
>     return ((1ull << slots) - 1) << var->data.location;
>  }
>  
> -static uint64_t
> -tcs_output_read_bitmask(nir_shader *shader)
> +static void
> +tcs_output_read_bitmask(nir_shader *shader, uint64_t *read)

Maybe rename to tcs_add_output_reads() or something, now that it's not
returning a bitmask?

Other than that suggestion, this is a pretty obvious extension of the
existing code.

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171009/64478f74/attachment.sig>


More information about the mesa-dev mailing list