* (0 means don't store this bit, 1 means do store).
*/
static void lp_exec_mask_store(struct lp_exec_mask *mask,
+ struct lp_build_context *bld_store,
LLVMValueRef pred,
LLVMValueRef val,
LLVMValueRef dst)
LLVMValueRef real_val, dst_val;
dst_val = LLVMBuildLoad(builder, dst, "");
- real_val = lp_build_select(mask->bld,
+ real_val = lp_build_select(bld_store,
pred,
val, dst_val);
const struct tgsi_full_dst_register *reg = &inst->Dst[index];
struct lp_build_context *uint_bld = &bld->uint_bld;
LLVMValueRef indirect_index = NULL;
+ struct lp_build_context *bld_store;
+
+ bld_store = &bld->bld_base.base;
switch( inst->Instruction.Saturate ) {
case TGSI_SAT_NONE:
else {
LLVMValueRef out_ptr = lp_get_output_ptr(bld, reg->Register.Index,
chan_index);
- lp_exec_mask_store(&bld->exec_mask, pred, value, out_ptr);
+ lp_exec_mask_store(&bld->exec_mask, bld_store, pred, value, out_ptr);
}
break;
else {
LLVMValueRef temp_ptr = lp_get_temp_ptr_soa(bld, reg->Register.Index,
chan_index);
- lp_exec_mask_store(&bld->exec_mask, pred, value, temp_ptr);
+ lp_exec_mask_store(&bld->exec_mask, bld_store, pred, value, temp_ptr);
}
break;
case TGSI_FILE_ADDRESS:
- lp_exec_mask_store(&bld->exec_mask, pred, value,
+ lp_exec_mask_store(&bld->exec_mask, bld_store, pred, value,
bld->addr[reg->Register.Index][chan_index]);
break;
case TGSI_FILE_PREDICATE:
- lp_exec_mask_store(&bld->exec_mask, pred, value,
+ lp_exec_mask_store(&bld->exec_mask, bld_store, pred, value,
bld->preds[reg->Register.Index][chan_index]);
break;