[Mesa-dev] [PATCH 7/8] RFC: llvmpipe: Add byte-swap construct calls

Adhemerval Zanella azanella at linux.vnet.ibm.com
Thu Nov 22 12:35:23 PST 2012


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?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-llvmpipe-Add-byte-swap-construct-calls.patch
Type: text/x-patch
Size: 4392 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121122/59ac68a5/attachment.bin>


More information about the mesa-dev mailing list