draw: use SoA fetch, not AoS one
authorRoland Scheidegger <sroland@vmware.com>
Wed, 21 Dec 2016 03:43:07 +0000 (04:43 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Wed, 21 Dec 2016 03:48:24 +0000 (04:48 +0100)
commite827d9175675aaa6cfc0b981e2a80685fb7b3a74
treeb90389b09b57b6f151e114cca123256795121ed6
parentcb81460dcc61da0fb5ce066ee435c56840c0aba3
draw: use SoA fetch, not AoS one

Now that there's some SoA fetch which never falls back, we should always get
results which are better or at least not worse (something like rgba32f will
stay the same).

For cases which get way better, think something like R16_UNORM with 8-wide
vectors: this was 8 sign-extend fetches, 8 cvt, 8 muls, followed by
a couple of shuffles to stitch things together (if it is smart enough,
6 unpacks) and then a (8-wide) transpose (not sure if llvm could even
optimize the shuffles + transpose, since the 16bit values were actually
sign-extended to 128bit before being cast to a float vec, so that would be
another 8 unpacks). Now that is just 8 fetches (directly inserted into
vector, albeit there's one 128bit insert needed), 1 cvt, 1 mul.

v2: ditch the old AoS code instead of just disabling it.

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