ac/llvm: fix 16bit varying llvm compile error
authorQiang Yu <yuq825@gmail.com>
Fri, 18 Nov 2022 08:37:19 +0000 (16:37 +0800)
committerMarge Bot <emma+marge@anholt.net>
Mon, 21 Nov 2022 01:06:56 +0000 (01:06 +0000)
commite3b1f26a2b83538eb175be28b2e785bbe626bf5f
treee561194b8b90059c3c34f9a2e51ab08d94a9a03a
parente8ff841e983c4b45ff0449796fc17d73a8ca599c
ac/llvm: fix 16bit varying llvm compile error

Found when 16bit vec3 varying with llvm14 (not found
when llvm15), one 32bit vec4 slot is filled like this:
  vec3[0] | undef
  vec3[1] | undef
  vec3[2] | undef
  undef   | undef

LLVM error is for the elements with undef:
  %287 = insertelement float %280, half %279, i64 0

After this change, we get:
  %287 = insertelement <2 x half> %280, half %279, i64 0

Fixes: 279eea5bda2 ("amd/llvm: Transition to LLVM "opaque pointers"")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19848>
src/amd/llvm/ac_nir_to_llvm.c