[PATCH 3/5] wined3d: Remove ARB_/EXT_TEXTURE_ENV_ADD.

Matteo Bruni matteo.mystral at gmail.com
Wed Feb 25 08:22:41 CST 2015

2015-02-25 9:42 GMT+01:00 Henri Verbeet <hverbeet at gmail.com>:
> On 24 February 2015 at 13:38, Matteo Bruni <mbruni at codeweavers.com> wrote:
>> Unused.
>> ---
> But they should be used by ffp_fragment_get_caps(), since set_tex_op()
> uses that functionality.

It's not all that clear and nice. set_tex_op() really depends on
GL_(ARB|EXT)_texture_env_combine, since it's always setting
knobs to set the texture color or alpha operation state (and those
include the ADD setting for the COMBINE pname).
There is actually no instance of GL_TEXTURE_ENV_MODE being set to
GL_ADD in wined3d, which is the only addition in the
GL_ARB_texture_env_add spec.

So TEXTURE_ENV_ADD is really unused AFAICS. We do always depend on
GL_(ARB|EXT)_texture_env_combine and we're not exposing that
dependency correctly. I'm not sure I want to spend much time on fixing
that or introducing a fallback for the case where those extensions are
missing. Maybe I should just add an early-exit branch in set_tex_op
for the no *_texture_env_combine case, handling only the few settings
supported in unextended OpenGL (which are MODULATE, SELECTARG1 and
SELECTARG2 I think) and update ffp_fragment_get_caps() accordingly.

More information about the wine-devel mailing list