Commit aad0ab81 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Properly handle WINED3DSIH_DP2 in the GLSL shader backend.

parent a37099e1
......@@ -2665,13 +2665,13 @@ static void shader_glsl_dot(const struct wined3d_shader_instruction *ins)
dst_write_mask = shader_glsl_append_dst(buffer, ins);
dst_size = shader_glsl_get_write_mask_size(dst_write_mask);
/* dp3 works on vec3, dp4 on vec4 */
/* dp4 works on vec4, dp3 on vec3, etc. */
if (ins->handler_idx == WINED3DSIH_DP4)
{
src_write_mask = WINED3DSP_WRITEMASK_ALL;
} else {
else if (ins->handler_idx == WINED3DSIH_DP3)
src_write_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1 | WINED3DSP_WRITEMASK_2;
}
else
src_write_mask = WINED3DSP_WRITEMASK_0 | WINED3DSP_WRITEMASK_1;
shader_glsl_add_src_param(ins, &ins->src[0], src_write_mask, &src0_param);
shader_glsl_add_src_param(ins, &ins->src[1], src_write_mask, &src1_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