* \param type the data type of the fragment depth/stencil values
* \param format_desc description of the depth/stencil surface
* \param is_1d whether this resource has only one dimension
- * \param mask the alive/dead pixel mask for the quad (vector)
+ * \param mask_value the alive/dead pixel mask for the quad (vector)
* \param z_fb z values read from fb (with padding)
* \param s_fb s values read from fb (with padding)
* \param loop_counter the current loop iteration
struct lp_type z_src_type,
const struct util_format_description *format_desc,
boolean is_1d,
- struct lp_build_mask_context *mask,
+ LLVMValueRef mask_value,
LLVMValueRef z_fb,
LLVMValueRef s_fb,
LLVMValueRef loop_counter,
struct lp_build_context z_bld;
LLVMValueRef shuffles[LP_MAX_VECTOR_LENGTH / 4];
LLVMBuilderRef builder = gallivm->builder;
- LLVMValueRef mask_value = NULL;
LLVMValueRef zs_dst1, zs_dst2;
LLVMValueRef zs_dst_ptr1, zs_dst_ptr2;
LLVMValueRef depth_offset1, depth_offset2;
s_value = LLVMBuildBitCast(builder, s_value, z_bld.vec_type, "");
}
- if (mask) {
- mask_value = lp_build_mask_value(mask);
+ if (mask_value) {
z_value = lp_build_select(&z_bld, mask_value, z_value, z_fb);
if (format_desc->block.bits > 32) {
s_fb = LLVMBuildBitCast(builder, s_fb, z_bld.vec_type, "");
struct lp_type z_src_type,
const struct util_format_description *format_desc,
boolean is_1d,
- struct lp_build_mask_context *mask,
+ LLVMValueRef mask_value,
LLVMValueRef z_fb,
LLVMValueRef s_fb,
LLVMValueRef loop_counter,
*/
lp_build_depth_stencil_write_swizzled(gallivm, type,
zs_format_desc, key->resource_1d,
- &mask, z_fb, s_fb, loop_state.counter,
+ lp_build_mask_value(&mask), z_fb, s_fb, loop_state.counter,
depth_ptr, depth_stride,
z_value, s_value);
}