st/mesa: Update shader info of ffvp/ARB_vp after translation to NIR
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Thu, 16 Apr 2020 13:34:25 +0000 (16:34 +0300)
committerDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Fri, 17 Apr 2020 17:16:15 +0000 (20:16 +0300)
commitd684fb37bfbc47d098158cb03c0672119a4469fe
treeb7dd6830e2276cffc810bba6b521bc75d48714c2
parentc4ca9e66ddb507831b2d35e927d6310775006894
st/mesa: Update shader info of ffvp/ARB_vp after translation to NIR

We must update stp->Base.info after translation and before
st_prepare_vertex_program is called, because inputs_read
may become outdated after NIR optimization passes.

For ffvp/ARB_vp inputs_read is populated based on declared
attributes without taking their usage into consideration.
When creating shader variants we expect that their inputs_read
would match the base ones for input mapping to work properly.

Cc: <mesa-stable@lists.freedesktop.org>
Fixes: 8a0dd0af3f1a6c0310a08daf4220132ec6815b31
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2758
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4598>
src/mesa/state_tracker/st_program.c