aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-03-20 19:30:06 +1000
committerMarge Bot <[email protected]>2020-05-06 06:20:37 +0000
commit69009949e0418d0b1907fd31f486058642c90c92 (patch)
tree093c3224a304a06180fc2d96aead9776e09b6e1f /src
parent66a92e5d923a2e6b948c71f37a6b109a00938e9f (diff)
llvmpipe: add multisample alpha to one support
Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 15ec9048052..cf0a68ecc8d 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -690,7 +690,16 @@ generate_fs_loop(struct gallivm_state *gallivm,
}
}
}
-
+ if (key->blend.alpha_to_one && key->multisample) {
+ for (attrib = 0; attrib < shader->info.base.num_outputs; ++attrib) {
+ unsigned cbuf = shader->info.base.output_semantic_index[attrib];
+ if ((shader->info.base.output_semantic_name[attrib] == TGSI_SEMANTIC_COLOR) &&
+ ((cbuf < key->nr_cbufs) || (cbuf == 1 && dual_source_blend)))
+ if (outputs[cbuf][3]) {
+ LLVMBuildStore(builder, lp_build_const_vec(gallivm, type, 1.0), outputs[cbuf][3]);
+ }
+ }
+ }
if (shader->info.base.writes_samplemask) {
int smaski = find_output_by_semantic(&shader->info.base,
TGSI_SEMANTIC_SAMPLEMASK,