intel/fs: Reuse the same FS input slot for VUE header fields.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 15 Dec 2021 08:35:40 +0000 (00:35 -0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Jan 2022 01:31:47 +0000 (01:31 +0000)
commitd475e839daf96a19140bb5daa77998455ca36a90
treec721fd184855e4f704733e0bb692d74f3dd1024f
parent5f0bf2113ef03c36dfc68360736dd9156454e1f2
intel/fs: Reuse the same FS input slot for VUE header fields.

VARYING_SLOT_{VIEWPORT,LAYER,PSIZ} all live in the same VUE header slot,
and the FS is already set up to read the x/y/z/w component of that vec4.

However, we were setting up the SBE to pass each of those items as a
separate FS input, so hypothetically if a shader read all three, we
would burn 3 FS inputs with redundant data.  Not only was this passing
extra data to the FS, but it would count as extra input slots for the
"Do we have 16 or fewer attributes?" check for using SBE swizzling to
rearrange them in a convenient manner.

Now we make them share a single FS attribute and only count them once.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14210>
src/intel/compiler/brw_fs.cpp