nir/alu_to_scalar: Use ssa_for_alu_src in hand-rolled expansions
The ssa_for_alu_src helper will correctly handle swizzles and other source modifiers for you. The expansions for unpack_half_2x16, pack_uvec2_to_uint, and pack_uvec4_to_uint were all broken with regards to swizzles. The brokenness of unpack_half_2x16 was causing rendering errors in Rise of the Tomb Raider on Intel ever since c11833ab which added an extra copy propagation to the optimization pipeline and caused us to start seeing swizzles where we hadn't seen any before. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107926 Fixes: 9ce90105 "nir: Add lowering of nir_op_unpack_half_2x16." Fixes: 9b8786eb "nir: Add lowering support for packing opcodes." Tested-by:Alex Smith <asmith@feralinteractive.com> Tested-by:
Józef Kucia <joseph.kucia@gmail.com> Reviewed-by:
Matt Turner <mattst88@gmail.com> (cherry picked from commit dd553bc6)
Loading
Please register or sign in to comment