diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-11-22 02:42:46 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-11-22 02:42:46 +0000 |
commit | 7d70bc2a77ae7755475a72e11022d96635f79813 (patch) | |
tree | cc79fccd0b86231cd81df3075ade80fc69b802d6 /lib/mesa/src/gallium/auxiliary | |
parent | ade28eac1edf578af5dc16859f0f44478b57ca3c (diff) |
import Mesa 11.0.6
Diffstat (limited to 'lib/mesa/src/gallium/auxiliary')
-rw-r--r-- | lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c index d5cf698b0..e4849fe04 100644 --- a/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c +++ b/lib/mesa/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c @@ -289,7 +289,8 @@ lp_build_linear_to_srgb(struct gallivm_state *gallivm, c_const = lp_build_const_vec(gallivm, src_type, -0.0620f * 255.0f); tmp = lp_build_mul(&f32_bld, a_const, x0375); - tmp2 = lp_build_mad(&f32_bld, b_const, x05, c_const); + tmp2 = lp_build_mul(&f32_bld, b_const, x05); + tmp2 = lp_build_add(&f32_bld, tmp2, c_const); pow_final = lp_build_add(&f32_bld, tmp, tmp2); } @@ -352,7 +353,7 @@ lp_build_float_to_srgb_packed(struct gallivm_state *gallivm, dst = lp_build_zero(gallivm, int32_type); for (chan = 0; chan < dst_fmt->nr_channels; chan++) { - if (dst_fmt->swizzle[chan] <= PIPE_SWIZZLE_W) { + if (dst_fmt->swizzle[chan] <= UTIL_FORMAT_SWIZZLE_W) { unsigned ls; LLVMValueRef shifted, shift_val; ls = dst_fmt->channel[dst_fmt->swizzle[chan]].shift; |