tgsi/lowering: add support for lowering FLR and CEIL
authorRussell King <rmk@arm.linux.org.uk>
Wed, 13 Apr 2016 22:42:39 +0000 (18:42 -0400)
committerRob Clark <robclark@freedesktop.org>
Tue, 19 Apr 2016 20:04:44 +0000 (16:04 -0400)
commit23e870a888e24b25f9b61a9b1e486e3ef2c7a12c
tree827183c4b4228b7d474556bb28be9b17257d07fe
parent464cef5b06e65aa740704e4adac68b7f5fee1b88
tgsi/lowering: add support for lowering FLR and CEIL

Add support for lowering FLR and CEIL to FRC/SUB and FRC/ADD
instructions for GPUs that support FRC but not FLR or CEIL.  Since
these uses FRC, it is invalid to ask for FLR or CEIL to be lowered
along with FRC, so add an assert to catch this invalid configuration.

We also need to deal with FLR instructions emitted by the lowering
code.  Fix these up with the FRC+SUB equivalent when FLR lowering is
enabled.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/auxiliary/tgsi/tgsi_lowering.c
src/gallium/auxiliary/tgsi/tgsi_lowering.h