st/nir: Optionally unify inputs_read/outputs_written when linking.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 17 Jun 2019 22:10:06 +0000 (17:10 -0500)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 3 Jan 2020 00:41:50 +0000 (00:41 +0000)
commit19ed12afd170c97180a9cc7eb6c5589d4c427a40
tree82dfbe6648f3a43fe13f15bc2d81d47cc4341a97
parent7a9c0fc0d778dd8ea6ed2c94efbe1374f9535a00
st/nir: Optionally unify inputs_read/outputs_written when linking.

i965 and iris use inputs_read/outputs_written for a shader stage to
determine the layout of input and output storage.  Adjacent stages must
agree on the layout, so adjacent input/output bitfields must match.

This patch adds a new nir_shader_compiler_options::unify_interfaces
flag which asks the linker to unify the input/output interfaces between
adjacent stages.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3249>
src/compiler/nir/nir.h
src/mesa/state_tracker/st_glsl_to_nir.cpp