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.
This commit is contained in:
Henri Verbeet 2009-04-02 10:41:00 +02:00 committed by Alexandre Julliard
parent c697bdc3a1
commit fb6547a3e1
1 changed files with 2 additions and 1 deletions

View File

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