diff options
author | James Benton <[email protected]> | 2012-07-11 15:39:53 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2012-11-28 19:14:36 +0000 |
commit | 1d3789bccbbcc814fd7b339e9f5b5631e30d9f0e (patch) | |
tree | ddddaade4fc5884e3a33b2195a160a45868bc869 /src/gallium/drivers | |
parent | d03d29a0442e8c1bfb1567f33abc83373a203220 (diff) |
gallivm: Updated lp_build_const_mask_aos to input number of channels.
Also updated lp_build_const_mask_aos_swizzled to reflect this.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_setup.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c index 66df662711c..c615c2d6f5b 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c @@ -267,12 +267,15 @@ lp_build_blend_aos(struct gallivm_state *gallivm, const unsigned char swizzle[4]) { const struct pipe_rt_blend_state * state = &blend->rt[rt]; + const struct util_format_description * desc; struct lp_build_blend_aos_context bld; LLVMValueRef src_factor, dst_factor; LLVMValueRef result; unsigned alpha_swizzle = swizzle[3]; boolean fullcolormask; + desc = util_format_description(cbuf_format[rt]); + /* Setup build context */ memset(&bld, 0, sizeof bld); lp_build_context_init(&bld.base, gallivm, type); @@ -333,7 +336,7 @@ lp_build_blend_aos(struct gallivm_state *gallivm, if (!fullcolormask) { LLVMValueRef color_mask; - color_mask = lp_build_const_mask_aos_swizzled(gallivm, bld.base.type, state->colormask, swizzle); + color_mask = lp_build_const_mask_aos_swizzled(gallivm, bld.base.type, state.colormask, desc->nr_channels, swizzle); lp_build_name(color_mask, "color_mask"); /* Combine with input mask if necessary */ diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c index 469a4595556..f44eed49fba 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c @@ -472,7 +472,7 @@ emit_apply_cyl_wrap(struct gallivm_state *gallivm, /* Constants */ pos_half = lp_build_const_vec(gallivm, type, +0.5f); neg_half = lp_build_const_vec(gallivm, type, -0.5f); - cyl_mask = lp_build_const_mask_aos(gallivm, type, cyl_wrap); + cyl_mask = lp_build_const_mask_aos(gallivm, type, cyl_wrap, 4); one = lp_build_const_vec(gallivm, type, 1.0f); one = LLVMBuildBitCast(builder, one, lp_build_int_vec_type(gallivm, type), ""); |