ac/nir/ngg,radv: use intrinsic base for instance_rate_inputs check
authorQiang Yu <yuq825@gmail.com>
Thu, 17 Nov 2022 02:17:21 +0000 (10:17 +0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 22 Nov 2022 05:46:06 +0000 (05:46 +0000)
commitd18a28ae87dc7b09063a4a6071d1799514b7678e
tree13c64603fb477fac4a952faf3413b7f7c174c765
parent9cec1ed51d16e62950aceec161511a28ec799f21
ac/nir/ngg,radv: use intrinsic base for instance_rate_inputs check

radeonsi use packed location base while radv use un-packed location.
So we adjust instance_rate_inputs in each driver to hide the difference.
Note the attribute slot number is less than 16, so we can shift
instance_rate_inputs in radv by VERT_ATTRIB_GENERIC0 which is 16.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19868>
src/amd/common/ac_nir_lower_ngg.c
src/amd/vulkan/radv_shader.c