i965: call brw_nir_lower_uniforms() after uniform linking is complete
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 6 May 2020 04:01:41 +0000 (14:01 +1000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Jun 2020 10:34:22 +0000 (10:34 +0000)
commitf518508a817aa5af1eee988439f73ecf6279e9c5
tree253680c25dc4b50392f72d27fbb4cc96df8cd655
parent907bacea13fff7939edf67fba5b3a6eaf9f1f5dc
i965: call brw_nir_lower_uniforms() after uniform linking is complete

i965 currently uses the NIR uniform linker for spirv support. Until
now the only reason there has been no issue with calling the
lowering pass before the linker is because no garbage collection
is done between the calls.

An upcoming change to the linker will add an optimisation to resize
unform arrays where possible. Because lowering causes the array
defs to no longer be used the new optimisation ends up resizing the
arrays to 0. To fix this we move the lowering call after the
linking calls.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4910>
src/mesa/drivers/dri/i965/brw_program.c