diff options
author | Roland Scheidegger <sroland@vmware.com> | 2013-03-29 06:16:33 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2013-03-29 16:39:40 +0100 |
commit | 5f41e08cf39d585d600aa506cdcd2f5380c60ddd (patch) | |
tree | 21d5737a38f0f87fad86c95aa0207e024ba260e0 /src/gallium/auxiliary/gallivm/lp_bld_format.h | |
parent | 4412f3bc13886751f91f265babd78bac28c7ba41 (diff) | |
download | external_mesa3d-5f41e08cf39d585d600aa506cdcd2f5380c60ddd.zip external_mesa3d-5f41e08cf39d585d600aa506cdcd2f5380c60ddd.tar.gz external_mesa3d-5f41e08cf39d585d600aa506cdcd2f5380c60ddd.tar.bz2 |
gallivm: consolidate some half-to-float and r11g11b10-to-float code
Similar enough that we can try to use shared code.
v2: fix a stupid bug using wrong variable causing mayhem with Inf and NaNs.
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.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format.h b/src/gallium/auxiliary/gallivm/lp_bld_format.h index f9ddc68..aa8c729 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_format.h @@ -127,6 +127,15 @@ lp_build_fetch_subsampled_rgba_aos(struct gallivm_state *gallivm, */ LLVMValueRef +lp_build_smallfloat_to_float(struct gallivm_state *gallivm, + struct lp_type f32_type, + LLVMValueRef src, + unsigned mantissa_bits, + unsigned exponent_bits, + unsigned mantissa_start, + boolean has_sign); + +LLVMValueRef lp_build_float_to_r11g11b10(struct gallivm_state *gallivm, LLVMValueRef *src); |