X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_bld_alpha.c;h=518969c3202bb8d23b08085a2fec5beff3f8976f;hb=bb71f9249a66b9a4921a878766c0a2d87624c369;hp=2b4bc5c819d7c85e3c137f142889a2318e61739e;hpb=de25f82067bca5231fb968190f6c12cb517d62ff;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/lp_bld_alpha.c b/src/gallium/drivers/llvmpipe/lp_bld_alpha.c index 2b4bc5c819d..518969c3202 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_alpha.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_alpha.c @@ -33,32 +33,35 @@ #include "pipe/p_state.h" -#include "lp_bld_type.h" -#include "lp_bld_const.h" -#include "lp_bld_arit.h" -#include "lp_bld_logic.h" -#include "lp_bld_flow.h" -#include "lp_bld_debug.h" +#include "gallivm/lp_bld_type.h" +#include "gallivm/lp_bld_const.h" +#include "gallivm/lp_bld_logic.h" +#include "gallivm/lp_bld_flow.h" +#include "gallivm/lp_bld_debug.h" + #include "lp_bld_alpha.h" void -lp_build_alpha_test(LLVMBuilderRef builder, - const struct pipe_alpha_state *state, +lp_build_alpha_test(struct gallivm_state *gallivm, + unsigned func, struct lp_type type, struct lp_build_mask_context *mask, LLVMValueRef alpha, - LLVMValueRef ref) + LLVMValueRef ref, + boolean do_branch) { struct lp_build_context bld; + LLVMValueRef test; + + lp_build_context_init(&bld, gallivm, type); - lp_build_context_init(&bld, builder, type); + test = lp_build_cmp(&bld, func, alpha, ref); - if(state->enabled) { - LLVMValueRef test = lp_build_cmp(&bld, state->func, alpha, ref); + lp_build_name(test, "alpha_mask"); - lp_build_name(test, "alpha_mask"); + lp_build_mask_update(mask, test); - lp_build_mask_update(mask, test); - } + if (do_branch) + lp_build_mask_check(mask); }