From 3d7a88674f9eb3320eeff511968f041426e25023 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 21 Aug 2009 13:49:10 +0100 Subject: llvmpipe: Early depth testing. --- src/gallium/drivers/llvmpipe/lp_bld_flow.h | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/gallium/drivers/llvmpipe/lp_bld_flow.h') diff --git a/src/gallium/drivers/llvmpipe/lp_bld_flow.h b/src/gallium/drivers/llvmpipe/lp_bld_flow.h index 7281b278a0..1b634ff038 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_flow.h +++ b/src/gallium/drivers/llvmpipe/lp_bld_flow.h @@ -38,6 +38,40 @@ #include +union lp_type; + + +struct lp_build_mask_context +{ + LLVMBuilderRef builder; + + LLVMTypeRef reg_type; + + LLVMValueRef value; + + LLVMValueRef phi; + + LLVMBasicBlockRef skip_block; +}; + + +void +lp_build_mask_begin(struct lp_build_mask_context *mask, + LLVMBuilderRef builder, + union lp_type type, + LLVMValueRef value); + +/** + * Bitwise AND the mask with the given value, if a previous mask was set. + */ +void +lp_build_mask_update(struct lp_build_mask_context *mask, + LLVMValueRef value); + +LLVMValueRef +lp_build_mask_end(struct lp_build_mask_context *mask); + + /** * LLVM's IR doesn't represent for-loops directly. Furthermore it * it requires creating code blocks, branches, phi variables, so it -- cgit v1.2.3