[Mesa-dev] [PATCH 7/8] RFC: llvmpipe: Add byte-swap construct calls
Roland Scheidegger
sroland at vmware.com
Thu Nov 22 13:34:52 PST 2012
Am 22.11.2012 21:35, schrieb Adhemerval Zanella:
> This patch adds two more functions in type conversions header:
> * lp_build_bswap: construct a call to llvm.bswap intrinsic for an
> element
> * lp_build_bswap_vec: byte swap every element in a vector base on the
> input and output types.
>
> Currently my approach for vectors is naive: it recreates a vector
> by byte-swapping each element on the source vector. Right now I'm
> aiming for correctness, but I plan to create a better approach by
> using vector shuffles with a correct mask.
>
> Any tips, advices, comments?
>
Looks good to me. A pity the llvm intrinsic doesn't take vectors (and
yeah the extract/bswap/insert method is terrible...).
Roland
More information about the mesa-dev
mailing list