wined3d: Properly handle WINED3DSIH_DP2 in the GLSL shader backend.

This commit is contained in:
Henri Verbeet 2015-04-15 11:07:12 +02:00 committed by Alexandre Julliard
parent a37099e132
commit aad0ab8101
1 changed files with 4 additions and 4 deletions

View File

@ -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);