diff options
author | Keith Whitwell <keithw@vmware.com> | 2010-10-07 15:01:07 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2010-10-09 11:44:45 +0100 |
commit | aa4cb5e2d8d48c7dcc9653c61a9e25494e3e7b2a (patch) | |
tree | 3989a7c0e78bbb8a96ec68de8b420c4b2f64d7a9 /src/gallium/drivers/llvmpipe/lp_bld_alpha.c | |
parent | 2ef6f75ab410bb188e028024e18891d7877febad (diff) |
llvmpipe: try to be sensible about whether to branch after mask updates
Don't branch more than once in quick succession. Don't branch at the
end of the shader.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_alpha.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_alpha.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_alpha.c b/src/gallium/drivers/llvmpipe/lp_bld_alpha.c index e28efe778f..e50643790c 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_alpha.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_alpha.c @@ -48,7 +48,8 @@ lp_build_alpha_test(LLVMBuilderRef builder, struct lp_type type, struct lp_build_mask_context *mask, LLVMValueRef alpha, - LLVMValueRef ref) + LLVMValueRef ref, + boolean do_branch) { struct lp_build_context bld; LLVMValueRef test; @@ -60,4 +61,7 @@ lp_build_alpha_test(LLVMBuilderRef builder, lp_build_name(test, "alpha_mask"); lp_build_mask_update(mask, test); + + if (do_branch) + lp_build_mask_check(mask); } |