nir: improve convert_yuv_to_rgb
authorJonathan Marek <jonathan@marek.ca>
Fri, 30 Nov 2018 02:43:12 +0000 (21:43 -0500)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 1 May 2019 11:13:36 +0000 (04:13 -0700)
commit0c6702cfa581d8126cac73c0a1d9980b3b6b94db
treefd3aa7c6a47654110be5e351d55c7a6d43cf7fb9
parentbecd192801647fdedd8fa79fdc4c6a4307d6836e
nir: improve convert_yuv_to_rgb

Use a different arrangement of constants to allow more ffma.

A vec4 backend will now use 3 fma for yuv_to_rgb. On freedreno/ir3, it is
down from 10 to 7 alu (4 fma, 3 mul, 3 add to 7 fma). Other backends
shouldn't be hurt.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/nir/nir_lower_tex.c