summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_bld_alpha.c
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-08-21 07:42:29 +0100
committerJosé Fonseca <[email protected]>2009-08-29 09:21:37 +0100
commitc0472f9c34da78bccecb2c790b54b9dd9712a0b9 (patch)
treebe554214b9b558b85bf42e163747317e1f9dd076 /src/gallium/drivers/llvmpipe/lp_bld_alpha.c
parent3dbf00f9ab0d2e771c72a74d9db32c048ce7df4e (diff)
llvmpipe: Centralize mask update logic.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_alpha.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_alpha.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_alpha.c b/src/gallium/drivers/llvmpipe/lp_bld_alpha.c
index a3faa22b997..58f6f6cd8ff 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_alpha.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_alpha.c
@@ -41,12 +41,12 @@
#include "lp_bld_alpha.h"
-LLVMValueRef
+void
lp_build_alpha_test(LLVMBuilderRef builder,
const struct pipe_alpha_state *state,
union lp_type type,
- LLVMValueRef alpha,
- LLVMValueRef mask)
+ LLVMValueRef *mask,
+ LLVMValueRef alpha)
{
struct lp_build_context bld;
@@ -58,11 +58,6 @@ lp_build_alpha_test(LLVMBuilderRef builder,
lp_build_name(test, "alpha_mask");
- if(mask)
- mask = LLVMBuildAnd(builder, mask, test, "");
- else
- mask = test;
+ lp_build_mask_and(builder, mask, test);
}
-
- return mask;
}