llvmpipe: disable alpha test branch if multisample is enabled.

If multisample is enabled and alpha testing happens, the
branch can jump out of the fragment shader before the other
samples are generated. Just don't take the branch optimisation
post alpha test if multisample is enabled.

This should fix some rendering bugs in kicad with multisample
enabled.

Cc: mesa-stable
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17049>
This commit is contained in:
Dave Airlie 2022-06-15 16:26:18 +10:00 committed by Marge Bot
parent 18585cac04
commit 6e5d126a65

View file

@ -1005,7 +1005,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
lp_build_alpha_test(gallivm, key->alpha.func, type, cbuf_format_desc,
&mask, alpha, alpha_ref_value,
(depth_mode & LATE_DEPTH_TEST) != 0);
((depth_mode & LATE_DEPTH_TEST) != 0) && !key->multisample);
}
}