gallivm: fix bug in nested conditionals
authorBrian Paul <brianp@vmware.com>
Wed, 1 Sep 2010 01:14:18 +0000 (19:14 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 1 Sep 2010 01:15:07 +0000 (19:15 -0600)
This, plus the previous commit fix fd.o bug 29806.

src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c

index ca8db9ce01d1320b7c100e02acd7963aebad3115..0e07f7f3f38e2666cb57592c4be6539f0b37b863 100644 (file)
@@ -200,8 +200,10 @@ static void lp_exec_mask_cond_push(struct lp_exec_mask *mask,
    }
    mask->cond_stack[mask->cond_stack_size++] = mask->cond_mask;
    assert(LLVMTypeOf(val) == mask->int_vec_type);
-   mask->cond_mask = val;
-
+   mask->cond_mask = LLVMBuildAnd(mask->bld->builder,
+                                  mask->cond_mask,
+                                  val,
+                                  "");
    lp_exec_mask_update(mask);
 }