diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend.c b/src/gallium/drivers/llvmpipe/lp_bld_blend.c index e59c18c4725..edb46cb4e9d 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend.c @@ -321,6 +321,7 @@ lp_build_alpha_to_coverage(struct gallivm_state *gallivm, struct lp_type type, struct lp_build_mask_context *mask, LLVMValueRef alpha, + bool dither, bool do_branch) { struct lp_build_context bld; @@ -329,7 +330,7 @@ lp_build_alpha_to_coverage(struct gallivm_state *gallivm, lp_build_context_init(&bld, gallivm, type); - alpha_ref_value = lp_build_const_vec(gallivm, type, 0); + alpha_ref_value = lp_build_const_vec(gallivm, type, dither ? 0 : 0.5); test = lp_build_cmp(&bld, PIPE_FUNC_GREATER, alpha, alpha_ref_value); diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend.h b/src/gallium/drivers/llvmpipe/lp_bld_blend.h index b5db966a666..8f0c0c99a3d 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend.h +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend.h @@ -104,6 +104,7 @@ lp_build_alpha_to_coverage(struct gallivm_state *gallivm, struct lp_type type, struct lp_build_mask_context *mask, LLVMValueRef alpha, + bool dither, bool do_branch); #endif /* !LP_BLD_BLEND_H */ diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 40c812766bf..27cbac712ff 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -1150,6 +1150,7 @@ generate_fs_loop(struct gallivm_state *gallivm, if (!key->multisample) { lp_build_alpha_to_coverage(gallivm, type, &mask, alpha, + key->blend.alpha_to_coverage_dither, (depth_mode & LATE_DEPTH_TEST) != 0); } else { lp_build_sample_alpha_to_coverage(gallivm, type, key->coverage_samples, num_loop,