wined3d: Use 3 component norm for 'nrm' opcode in GLSL backend.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=8848 Signed-off-by: Paul Gofman <gofmanp@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
eb5afc560c
commit
447c9523f8
|
@ -4109,8 +4109,12 @@ static void shader_glsl_nrm(const struct wined3d_shader_instruction *ins)
|
|||
mask_size = shader_glsl_get_write_mask_size(write_mask);
|
||||
shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src_param);
|
||||
|
||||
shader_addline(buffer, "tmp0.x = dot(%s, %s);\n",
|
||||
src_param.param_str, src_param.param_str);
|
||||
if (mask_size > 3)
|
||||
shader_addline(buffer, "tmp0.x = dot(vec3(%s), vec3(%s));\n",
|
||||
src_param.param_str, src_param.param_str);
|
||||
else
|
||||
shader_addline(buffer, "tmp0.x = dot(%s, %s);\n",
|
||||
src_param.param_str, src_param.param_str);
|
||||
shader_glsl_append_dst(buffer, ins);
|
||||
|
||||
if (mask_size > 1)
|
||||
|
|
Loading…
Reference in New Issue