[PATCH] wined3d: Do not try to use not available texture stages in set_tex_op_nvr

Stefan Dösinger stefandoesinger at gmx.at
Fri Jan 1 13:26:56 CST 2010

> +    if (stage > (gl_info->limits.texture_stages-1))
> +    {
> +         ERR("Texture stage %d invalid (only %d availables)\n", stage, gl_info->limits.texture_stages);
> +         return;
> +    }
In which situations does this occur? I guess its on some older nvidia GPU.

I don't like the ERR here. If this occurs because an app ignores the d3d limits, then this should be a WARN. If this code is called because some other wined3d code doesn't honor the limits this should be fixed elsewhere. If this code is called correctly, and catching the limit violation in the state setter is the correct thing to do this should be a TRACE(e.g. the state handler is called because device creation dirtifies all states).

More information about the wine-devel mailing list