aco: don't use 32-bit fp inline constants for fp16 vop3p literals
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 2 May 2022 13:21:21 +0000 (14:21 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 5 Jul 2022 16:39:56 +0000 (16:39 +0000)
commit84b404d34db2b4b86633b3ec326f2bad6030d5e0
tree4f6dd31491ccb905441da529397c7b650e6e1e32
parent994f9b5a398eca6c10f28d8fce084c5594df2ff3
aco: don't use 32-bit fp inline constants for fp16 vop3p literals

If we're applying the literal 0x3f800000 to a fp16 vop3p instruction, we
shouldn't use the 1.0 inline constant, because the hardware will use the
16-bit 1.0: 0x00003c00.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16296>
src/amd/compiler/aco_assembler.cpp
src/amd/compiler/aco_ir.h
src/amd/compiler/aco_lower_to_hw_instr.cpp
src/amd/compiler/aco_optimizer.cpp