diff options
author | José Fonseca <[email protected]> | 2009-08-17 07:51:16 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-08-29 09:21:33 +0100 |
commit | aede39efd86d200ffbace8fc012104e31f673973 (patch) | |
tree | 0e7e73c9b442d6c374bd1744c3f6cb34ceb975eb /src/gallium | |
parent | 81e7ec485d5288bbce8b8e40af57fe4c0392c69f (diff) |
llvmpipe: Fix translation of KIL with repeated swizzles.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c b/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c index 4ec1b9dbd85..7ef01c04514 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_tgsi_soa.c @@ -386,14 +386,16 @@ emit_kil( } FOR_EACH_CHANNEL( chan_index ) { - LLVMValueRef mask; + if(terms[chan_index]) { + LLVMValueRef mask; - mask = lp_build_cmp(&bld->base, PIPE_FUNC_GEQUAL, terms[chan_index], bld->base.zero); - - if(bld->mask) - bld->mask = LLVMBuildAnd(bld->base.builder, bld->mask, mask, ""); - else - bld->mask = mask; + mask = lp_build_cmp(&bld->base, PIPE_FUNC_GEQUAL, terms[chan_index], bld->base.zero); + + if(bld->mask) + bld->mask = LLVMBuildAnd(bld->base.builder, bld->mask, mask, ""); + else + bld->mask = mask; + } } } |