summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-10-09 12:55:31 +0100
committerJosé Fonseca <[email protected]>2010-10-09 12:55:31 +0100
commitcc40abad519cc0f765c6d8f6fad4154bed8dd9c2 (patch)
tree86ba36c495c36af191b9b8fe903620fa8b171a9c /src/gallium/drivers/llvmpipe
parent679dd26623a53b5a052845bf4c6aef224cfdd5a2 (diff)
gallivm: Don't generate Phis for execution mask.
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_depth.c8
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c8
2 files changed, 7 insertions, 9 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/src/gallium/drivers/llvmpipe/lp_bld_depth.c
index 8d9be2ebbbf..e768493103e 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_depth.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.c
@@ -473,7 +473,7 @@ lp_build_depth_stencil_test(LLVMBuilderRef builder,
LLVMValueRef stencil_vals = NULL;
LLVMValueRef z_bitmask = NULL, stencil_shift = NULL;
LLVMValueRef z_pass = NULL, s_pass_mask = NULL;
- LLVMValueRef orig_mask = mask->value;
+ LLVMValueRef orig_mask = lp_build_mask_value(mask);
LLVMValueRef front_facing = NULL;
/* Prototype a simpler path:
@@ -527,7 +527,7 @@ lp_build_depth_stencil_test(LLVMBuilderRef builder,
type.sign = 1;
lp_build_context_init(&bld, builder, type);
- z_dst = lp_build_select(&bld, mask->value, z_src, z_dst);
+ z_dst = lp_build_select(&bld, lp_build_mask_value(mask), z_src, z_dst);
z_dst = LLVMBuildShl(builder, z_dst, const_8_int, "z_dst");
*zs_value = z_dst;
}
@@ -710,7 +710,7 @@ lp_build_depth_stencil_test(LLVMBuilderRef builder,
}
if (depth->writemask) {
- LLVMValueRef zselectmask = mask->value;
+ LLVMValueRef zselectmask = lp_build_mask_value(mask);
/* mask off bits that failed Z test */
zselectmask = LLVMBuildAnd(builder, zselectmask, z_pass, "");
@@ -810,7 +810,7 @@ lp_build_deferred_depth_write(LLVMBuilderRef builder,
lp_build_context_init(&bld, builder, type);
z_dst = LLVMBuildLoad(builder, zs_dst_ptr, "zsbufval");
- z_dst = lp_build_select(&bld, mask->value, zs_value, z_dst);
+ z_dst = lp_build_select(&bld, lp_build_mask_value(mask), zs_value, z_dst);
LLVMBuildStore(builder, z_dst, zs_dst_ptr);
}
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index f45f36f6332..cf07cb49764 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -422,16 +422,14 @@ generate_fs(struct llvmpipe_context *lp,
}
if (counter)
- lp_build_occlusion_count(builder, type, mask.value, counter);
+ lp_build_occlusion_count(builder, type,
+ lp_build_mask_value(&mask), counter);
- lp_build_mask_end(&mask);
+ *pmask = lp_build_mask_end(&mask);
lp_build_flow_scope_end(flow);
lp_build_flow_destroy(flow);
-
- *pmask = mask.value;
-
}