ac/nir: account for view index in the user sgpr allocation.
authorDave Airlie <airlied@redhat.com>
Thu, 18 Jan 2018 02:31:40 +0000 (02:31 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 18 Jan 2018 19:47:40 +0000 (19:47 +0000)
commit3153d742078d9842d867e8affddf0b157de762f0
tree8c41427cc6b6c91467fb679e8ea49d58a976dd51
parent5758a8c4027459fa5b51d47b4aba95c5126f3bfe
ac/nir: account for view index in the user sgpr allocation.

The view index user sgpr wasn't being accounted for properly,
this refactors out the code to decide if it's required and then
uses that info to account for it.

Fixes: 180c1b924e (ac/nir: Add shader support for multiviews.)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_nir_to_llvm.c