llvmpipe: Handle disabled blending too.

This commit is contained in:
José Fonseca 2009-08-09 22:59:52 +01:00
parent 62c91998ef
commit e7fc21434d
3 changed files with 13 additions and 1 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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 */
};