llvmpipe: support sRGB framebuffers 03/7503/1
authorRoland Scheidegger <sroland@vmware.com>
Mon, 15 Jul 2013 23:52:29 +0000 (01:52 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Mon, 15 Jul 2013 23:54:51 +0000 (01:54 +0200)
commitdc1cc928edc09b3e804702d299f1c71aef014354
tree7cf01823f5b41e56729f7ffad4dd6c055f57a8b5
parenta882067d74840ab87e35018bca53081f8deb460b
llvmpipe: support sRGB framebuffers

Just use the new conversion functions to do the work. The way it's plugged
in into the blend code is quite hacktastic but follows all the same hacks
as used by packed float format already.
Only support 4x8bit srgb formats (rgba/rgbx plus swizzle), 24bit formats never
worked anyway in the blend code and are thus disabled, and I don't think anyone
is interested in L8/L8A8. Would need even more hacks otherwise.
Unless I'm missing something, this is the last feature except MSAA needed for
OpenGL 3.0, and for OpenGL 3.1 as well I believe.

v2: prettify a bit, use separate function for packing.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_format.h
src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/llvmpipe/lp_state_fs.c