summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_format.h
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2014-03-20 16:43:36 +0100
committerRoland Scheidegger <sroland@vmware.com>2014-03-21 17:23:38 +0100
commit9477d8c862b206c35de0bc957a08524188abc898 (patch)
tree9fd13f6453dc28723b30b054451a41156b96a8e8 /src/gallium/auxiliary/gallivm/lp_bld_format.h
parent2aa77f2777ad35d7fe249939b0d828306f13eade (diff)
downloadexternal_mesa3d-9477d8c862b206c35de0bc957a08524188abc898.zip
external_mesa3d-9477d8c862b206c35de0bc957a08524188abc898.tar.gz
external_mesa3d-9477d8c862b206c35de0bc957a08524188abc898.tar.bz2
llvmpipe: add support for b5g6r5_srgb
The conversion code for srgb was tuned for n x 4x8bit AoS -> 4 x nxfloat SoA (and vice versa), fix this to handle also 16bit 565-style srgb formats. Still not really all that generic, things like r10g10b10a2_srgb or r4g4b4a4_srgb wouldn't work (the latter trivial to fix, the former would not require more work to not crash but near certainly need some higher precision calculation) but not needed right now. The code is not fully optimized for this (could use more direct calculation instead of expanding to 8-bit range first) but should be good enough. 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format.h b/src/gallium/auxiliary/gallivm/lp_bld_format.h
index a7a4ba0..1177fb2 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format.h
@@ -167,6 +167,7 @@ lp_build_float_to_srgb_packed(struct gallivm_state *gallivm,
LLVMValueRef
lp_build_srgb_to_linear(struct gallivm_state *gallivm,
struct lp_type src_type,
+ unsigned chan_bits,
LLVMValueRef src);