diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-08-21 13:49:10 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-08-29 09:21:39 +0100 |
commit | 3d7a88674f9eb3320eeff511968f041426e25023 (patch) | |
tree | 277d61dfc0ec2ab6595709b38ff46e09ea16c60a /src/gallium/drivers/llvmpipe/lp_bld_flow.h | |
parent | 90b5df8d1bbba9b11372d57e524586f28119c06f (diff) |
llvmpipe: Early depth testing.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_flow.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_flow.h | 34 |
1 files changed, 34 insertions, 0 deletions
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 <llvm-c/Core.h> +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 |