mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 15:00:11 +01:00
llvmpipe: asst. clean-ups in lp_bld_alpha.c
Signed-off-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
This commit is contained in:
parent
7d0616d835
commit
bee11cdab2
1 changed files with 5 additions and 6 deletions
|
|
@ -56,17 +56,16 @@ lp_build_alpha_test(struct gallivm_state *gallivm,
|
|||
boolean do_branch)
|
||||
{
|
||||
struct lp_build_context bld;
|
||||
LLVMValueRef test;
|
||||
|
||||
lp_build_context_init(&bld, gallivm, type);
|
||||
|
||||
/*
|
||||
* Alpha testing needs to be done in the color buffer precision.
|
||||
*
|
||||
* TODO: Ideally, instead of duplicating the color conversion code, we would do
|
||||
* alpha testing after converting the output colors, but that's not very
|
||||
* convenient, because it needs to be done before depth testing. Hopefully
|
||||
* LLVM will detect and remove the duplicate expression.
|
||||
* TODO: Ideally, instead of duplicating the color conversion code, we
|
||||
* would do alpha testing after converting the output colors, but that's
|
||||
* not very convenient, because it needs to be done before depth testing.
|
||||
* Hopefully LLVM will detect and remove the duplicate expression.
|
||||
*
|
||||
* FIXME: This should be generalized to formats other than rgba8 variants.
|
||||
*/
|
||||
|
|
@ -84,7 +83,7 @@ lp_build_alpha_test(struct gallivm_state *gallivm,
|
|||
lp_build_context_init(&bld, gallivm, type);
|
||||
}
|
||||
|
||||
test = lp_build_cmp(&bld, func, alpha, ref);
|
||||
LLVMValueRef test = lp_build_cmp(&bld, func, alpha, ref);
|
||||
|
||||
lp_build_name(test, "alpha_mask");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue