Commit 91305b1f authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use a more appropriate mask for masking out the write mask.

parent 1120f0f5
......@@ -1940,14 +1940,14 @@ static void shader_glsl_cmp(const struct wined3d_shader_instruction *ins)
(src1reg == dstreg && src1regtype == dstregtype) ||
(src2reg == dstreg && src2regtype == dstregtype)) {
write_mask = shader_glsl_get_write_mask(ins->dst[0].token & (~WINED3DSP_SWIZZLE_MASK | write_mask),
write_mask = shader_glsl_get_write_mask(ins->dst[0].token & (~WINED3DSP_WRITEMASK_ALL | write_mask),
mask_char);
if (!write_mask) continue;
shader_addline(ins->buffer, "tmp0%s = (", mask_char);
temp_destination = TRUE;
} else {
write_mask = shader_glsl_append_dst_ext(ins->buffer, ins,
ins->dst[0].token & (~WINED3DSP_SWIZZLE_MASK | write_mask));
ins->dst[0].token & (~WINED3DSP_WRITEMASK_ALL | write_mask));
if (!write_mask) continue;
}
......@@ -2008,7 +2008,7 @@ static void shader_glsl_cnd(const struct wined3d_shader_instruction *ins)
}
}
write_mask = shader_glsl_append_dst_ext(ins->buffer, ins,
ins->dst[0].token & (~WINED3DSP_SWIZZLE_MASK | write_mask));
ins->dst[0].token & (~WINED3DSP_WRITEMASK_ALL | write_mask));
if (!write_mask) continue;
shader_glsl_add_src_param(ins, ins->src[0], ins->src_addr[0], cmp_channel, &src0_param);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment