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

wined3d: Compare num_params against 1 in shader_glsl_map2gl().

num_params includes the destination parameter, while we're only interested in source parameters. This doesn't cause problems for any of the instrctions currently handled by shader_glsl_map2gl() though, since they all happen to have at least 1 source parameter.
parent c697bdc3
......@@ -1740,7 +1740,8 @@ static void shader_glsl_map2gl(const struct wined3d_shader_instruction *ins)
shader_addline(buffer, "%s(", instruction);
if (curOpcode->num_params > 0) {
if (curOpcode->num_params > 1)
{
shader_glsl_add_src_param(ins, ins->src[0], ins->src_addr[0], write_mask, &src_param);
shader_addline(buffer, "%s", src_param.param_str);
for (i = 2; i < curOpcode->num_params; ++i) {
......
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