summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_bld_depth.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-08-21 13:49:10 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-08-29 09:21:39 +0100
commit3d7a88674f9eb3320eeff511968f041426e25023 (patch)
tree277d61dfc0ec2ab6595709b38ff46e09ea16c60a /src/gallium/drivers/llvmpipe/lp_bld_depth.c
parent90b5df8d1bbba9b11372d57e524586f28119c06f (diff)
llvmpipe: Early depth testing.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_depth.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_depth.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/src/gallium/drivers/llvmpipe/lp_bld_depth.c
index 0cd6a5a95a..118c7c5213 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_depth.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.c
@@ -37,6 +37,7 @@
#include "lp_bld_type.h"
#include "lp_bld_const.h"
#include "lp_bld_logic.h"
+#include "lp_bld_flow.h"
#include "lp_bld_debug.h"
#include "lp_bld_depth.h"
@@ -83,7 +84,7 @@ lp_build_depth_test(LLVMBuilderRef builder,
const struct pipe_depth_state *state,
union lp_type type,
const struct util_format_description *format_desc,
- LLVMValueRef *mask,
+ struct lp_build_mask_context *mask,
LLVMValueRef src,
LLVMValueRef dst_ptr)
{
@@ -165,13 +166,13 @@ lp_build_depth_test(LLVMBuilderRef builder,
lp_build_name(dst, "zsbuf.z");
test = lp_build_cmp(&bld, state->func, src, dst);
- lp_build_mask_and(bld.builder, mask, test);
+ lp_build_mask_update(mask, test);
if(state->writemask) {
if(z_bitmask)
- z_bitmask = LLVMBuildAnd(builder, *mask, z_bitmask, "");
+ z_bitmask = LLVMBuildAnd(builder, mask->value, z_bitmask, "");
else
- z_bitmask = *mask;
+ z_bitmask = mask->value;
dst = lp_build_select(&bld, z_bitmask, src, dst);
LLVMBuildStore(builder, dst, dst_ptr);