diff options
author | Roland Scheidegger <[email protected]> | 2016-12-21 04:56:01 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2017-01-05 23:59:38 +0100 |
commit | 4634cb5921b985f04f2daf00cda2d28036143bd3 (patch) | |
tree | 71d18016633856cfbb77d20f265384d5e36e1e15 /m4 | |
parent | bc86e829a5c87714a7f3798fe9096c75692e5157 (diff) |
gallivm: implement aos unpack (to unorm8) for small unorm formats
Using bit replication. This path now resembles something which might make
sense. (The logic was mostly copied from llvmpipe fs backend.)
I am not convinced though it is actually faster than SoA sampling (actually
I'm quite certain it's always a loss with AVX).
With SoA it's just shift/mask/cvt/mul for getting the colors, whereas
there's still roughly 3 shifts, 3 or/and per channel for AoS
(i.e. for SoA it's exactly the same as it would be for a rgba8 format,
whereas the extra effort for AoS is significant). The filtering
might still be faster (albeit with FMA the instruction count gets down
quite a bit there on the SoA float filtering path on new cpus). And those
small unorm formats often don't have an alpha channel (which makes things
worse relatively for AoS path).
(This also fixes a trivial bug in the llvmpipe fs code this was derived
from, albeit it was only relevant for 4-bit channels.)
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'm4')
0 files changed, 0 insertions, 0 deletions