gallivm: use 2 srcs for 32->16bit conversions in lp_bld_conv_auto
authorRoland Scheidegger <sroland@vmware.com>
Wed, 21 Dec 2016 03:53:41 +0000 (04:53 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 5 Jan 2017 22:59:38 +0000 (23:59 +0100)
commita03a2ac6fd3005218eeddeae89e60115fbedde85
tree12adcdccc080b581f5b8e4c8d38074db8347e103
parentdb7e786a2552d808e512ba33fbc9b19d8bb37108
gallivm: use 2 srcs for 32->16bit conversions in lp_bld_conv_auto

If we only feed one source vector at a time, we cannot use pack intrinsics
(as we only have a 64bit destination dst vector). lp_bld_conv_auto is
specifically designed to alter the length and number of destination vectors,
so this works just fine (if we use single source vectors at a time, afterwards
we immediately reassemble the vectors).
For AVX though this isn't really possible, since we expect 128bit output
already for a single 256bit input. (One day we should handle AVX2 which again
would need multiple inputs, however there's the problem that we get different
ordered output there and we don't want to reorder, so would need to be able
to tell build_conv to handle upper and lower halfs independently.)
A similar strategy would probably work for 32->8bit too (if it doesn't hit
the special case) but I'm going to try something different for that...

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_conv.c