summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_format.h
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2013-07-16 01:52:29 +0200
committerRoland Scheidegger <sroland@vmware.com>2013-07-16 01:54:51 +0200
commitdc1cc928edc09b3e804702d299f1c71aef014354 (patch)
tree7cf01823f5b41e56729f7ffad4dd6c055f57a8b5 /src/gallium/auxiliary/gallivm/lp_bld_format.h
parenta882067d74840ab87e35018bca53081f8deb460b (diff)
downloadexternal_mesa3d-dc1cc928edc09b3e804702d299f1c71aef014354.zip
external_mesa3d-dc1cc928edc09b3e804702d299f1c71aef014354.tar.gz
external_mesa3d-dc1cc928edc09b3e804702d299f1c71aef014354.tar.bz2
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>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_format.h')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format.h b/src/gallium/auxiliary/gallivm/lp_bld_format.h
index 744d002..a7a4ba0 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format.h
@@ -159,9 +159,10 @@ lp_build_rgb9e5_to_float(struct gallivm_state *gallivm,
LLVMValueRef *dst);
LLVMValueRef
-lp_build_linear_to_srgb(struct gallivm_state *gallivm,
- struct lp_type src_type,
- LLVMValueRef src);
+lp_build_float_to_srgb_packed(struct gallivm_state *gallivm,
+ const struct util_format_description *dst_fmt,
+ struct lp_type src_type,
+ LLVMValueRef *src);
LLVMValueRef
lp_build_srgb_to_linear(struct gallivm_state *gallivm,