mesa: add a couple fast-paths to fast_read_rgba_pixels_memcpy()
authorBrian Paul <brianp@vmware.com>
Tue, 17 Apr 2012 16:49:16 +0000 (10:49 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 17 Apr 2012 19:22:18 +0000 (13:22 -0600)
commita5e95a419e4f6ad93e35a960113d97ae2de27476
tree58ab7b7bffec132a9ad3911cd48ecbab334173b2
parentb814506e87f2de8b76fe6bcfa8d2f5daf4f5ef64
mesa: add a couple fast-paths to fast_read_rgba_pixels_memcpy()

Accelerates a few glReadPixels cases for WebGL.
See https://bugs.freedesktop.org/show_bug.cgi?id=48545

v2: Per Jose, use bit twiddling for the swizzle case instead of ubyte
arrays (it's about 44% faster).

Note: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/main/readpix.c