diff options
author | José Fonseca <[email protected]> | 2009-08-09 22:59:52 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-08-29 09:21:27 +0100 |
commit | e7fc21434d2c5a9177a427950be5029ff4db43ee (patch) | |
tree | d9a9f8d19cb204e2b30f5c2303ba39a7ef404871 | |
parent | 62c91998efad508fe5323f25a7435aa93e718fdc (diff) |
llvmpipe: Handle disabled blending too.
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_blend_soa.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_blend.c | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c index e4a57af94c7..a9ea2f4986d 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c @@ -302,6 +302,9 @@ lp_build_blend_aos(LLVMBuilderRef builder, LLVMValueRef src_term; LLVMValueRef dst_term; + if(!blend->blend_enable) + return src; + /* It makes no sense to blend unless values are normalized */ assert(type.norm); diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend_soa.c b/src/gallium/drivers/llvmpipe/lp_bld_blend_soa.c index 1ef1718cfda..44c5a516e43 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend_soa.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend_soa.c @@ -167,6 +167,15 @@ lp_build_blend_soa(LLVMBuilderRef builder, struct lp_build_blend_soa_context bld; unsigned i, j; + if(!blend->blend_enable) { + for (i = 0; i < 4; ++i) + res[i] = src[i]; + return; + } + + /* It makes no sense to blend unless values are normalized */ + assert(type.norm); + /* Setup build context */ memset(&bld, 0, sizeof bld); lp_build_context_init(&bld.base, builder, type); diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index 8bf5508bd4e..5a09df5306f 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -766,7 +766,7 @@ blend_funcs[] = { const union lp_type blend_types[] = { /* float, fixed, sign, norm, width, len */ - {{ TRUE, FALSE, TRUE, TRUE, 32, 4 }}, /* f32 x 4 */ + {{ TRUE, FALSE, FALSE, TRUE, 32, 4 }}, /* f32 x 4 */ {{ FALSE, FALSE, FALSE, TRUE, 8, 16 }}, /* u8n x 16 */ }; |