intel/fs: fix per vertex input clamping
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 25 Apr 2023 21:20:37 +0000 (00:20 +0300)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Apr 2023 20:29:16 +0000 (20:29 +0000)
commit7ddc31c6721d241ba61573207c18c6b4626e4f78
tree9cb540a7f44f871c799e1dfbeffe94d1242bf1ac
parent79b3828e829821d87ba5141f9bff10643afefb84
intel/fs: fix per vertex input clamping

Only apply the clamp in multi patch mode (where the input vertices
vary between [1, 32]).

The clamp NIR pass operates on lowered intrinsics so we need to call
it after the inputs have been lowered.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e25e17dd0c ("intel/fs: clamp per vertex input accesses to patchControlPoints")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8912
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22701>
src/intel/compiler/brw_vec4_tcs.cpp