tgsi_to_nir: Emit load_ubo_vec4 instead of load_ubo on non-integer HW.
authorEmma Anholt <emma@anholt.net>
Fri, 4 Feb 2022 19:29:27 +0000 (11:29 -0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 20 Apr 2022 13:47:50 +0000 (13:47 +0000)
commit09fd1e94fd8b785f583ccac88cc211e3ab774a86
tree39a695e7a03a2e9da2864cc012c96e180f7f4817
parent535f0b9391446d49e3cb8bea33be6c5afc006a5a
tgsi_to_nir: Emit load_ubo_vec4 instead of load_ubo on non-integer HW.

Otherwise, we get an ishl that the HW can't support, and a ushr if the NIR
ends up being lowered to ubo_vec4, which may not get constant-folded if
the offset was non-constant.

This matches what mesa/st uses for this arg to uniform lowering.

Fixes: #5971
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14883>
src/gallium/auxiliary/nir/tgsi_to_nir.c