[Mesa-dev] [PATCH] st/glsl: refactor st_link_nir()

Eric Anholt eric at anholt.net
Sat Jan 5 00:21:16 UTC 2019


Timothy Arceri <tarceri at itsqueeze.com> writes:

> The functional change here is moving the nir_lower_io_to_scalar_early()
> calls inside st_nir_link_shaders() and moving the st_nir_opts() call
> after the call to nir_lower_io_arrays_to_elements().
>
> This fixes a bug with the following piglit test due to the current code
> not cleaning up dead code after we lower arrays. This was causing an
> assert in the new duplicate varyings link time opt introduced in
> 70be9afccb23.
>
> tests/spec/glsl-1.10/execution/vsfs-unused-array-member.shader_test
>
> Moving the nir_lower_io_to_scalar_early() calls also allows us to tidy
> up the code a little and merge some loops.

I love the reduction in stage tracking logic.

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/20190104/2cbdc844/attachment.sig>


More information about the mesa-dev mailing list