X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_bld_blend.h;h=f82ae30bb7dc8a277f5a48b792075b03c9471b0a;hb=1b749dc34f8d83cf3dfa863279b1fe2b356d34b2;hp=36f53dae935517ce1be38beadd9b032feb965f29;hpb=2529ed5616b1b152766a3355444260b88184cd6e;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend.h b/src/gallium/drivers/llvmpipe/lp_bld_blend.h index 36f53dae935..f82ae30bb7d 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend.h +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend.h @@ -29,24 +29,14 @@ #define LP_BLD_BLEND_H -/** - * @file - * LLVM IR building helpers interfaces. - * - * We use LLVM-C bindings for now. They are not documented, but follow the C++ - * interfaces very closely, and appear to be complete enough for code - * genration. See - * http://npcontemplation.blogspot.com/2008/06/secret-of-llvm-c-bindings.html - * for a standalone example. - */ - -#include +#include "gallivm/lp_bld.h" +#include "gallivm/lp_bld_init.h" #include "pipe/p_format.h" struct pipe_blend_state; -union lp_type; +struct lp_type; struct lp_build_context; @@ -72,9 +62,10 @@ lp_build_blend_func(struct lp_build_context *bld, LLVMValueRef -lp_build_blend_aos(LLVMBuilderRef builder, +lp_build_blend_aos(struct gallivm_state *gallivm, const struct pipe_blend_state *blend, - union lp_type type, + struct lp_type type, + unsigned rt, LLVMValueRef src, LLVMValueRef dst, LLVMValueRef const_, @@ -82,13 +73,27 @@ lp_build_blend_aos(LLVMBuilderRef builder, void -lp_build_blend_soa(LLVMBuilderRef builder, +lp_build_blend_soa(struct gallivm_state *gallivm, const struct pipe_blend_state *blend, - union lp_type type, + struct lp_type type, + unsigned rt, LLVMValueRef src[4], LLVMValueRef dst[4], LLVMValueRef const_[4], LLVMValueRef res[4]); +/** + * Apply a logic op. + * + * src/dst parameters are packed values. It should work regardless the inputs + * are scalars, or a vector. + */ +LLVMValueRef +lp_build_logicop(LLVMBuilderRef builder, + unsigned logicop_func, + LLVMValueRef src, + LLVMValueRef dst); + + #endif /* !LP_BLD_BLEND_H */