aco: set constant_data_offset correctly in the case of merged shaders
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 6 Aug 2020 13:16:08 +0000 (14:16 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 10 Aug 2020 18:21:47 +0000 (18:21 +0000)
commit6e70508151823ce63e0976b4fa56e4d847a3c9b8
tree8c7d55edac90125771f010d7050911d617d91fd9
parent0f8ef37f653bbb1fffa6813697e2ffe21dae2016
aco: set constant_data_offset correctly in the case of merged shaders

setup_nir() is done for all shaders before any of them are selected, so
constant_data_offset could be incorrect for the first shader.

Fixes incorrect geometry in Mafia III and Max Payne 3.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2768
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6205>
src/amd/compiler/aco_instruction_selection_setup.cpp