On 24 February 2015 at 13:38, Matteo Bruni mbruni@codeweavers.com wrote:
Unused.
But they should be used by ffp_fragment_get_caps(), since set_tex_op() uses that functionality.
2015-02-25 9:42 GMT+01:00 Henri Verbeet hverbeet@gmail.com:
On 24 February 2015 at 13:38, Matteo Bruni mbruni@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 GL_TEXTURE_ENV_MODE to GL_COMBINE (or GL_COMBINE4_NV) and using its 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.
On 25 February 2015 at 15:22, Matteo Bruni matteo.mystral@gmail.com wrote:
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 GL_TEXTURE_ENV_MODE to GL_COMBINE (or GL_COMBINE4_NV) and using its knobs to set the texture color or alpha operation state (and those include the ADD setting for the COMBINE pname).
Right, we actually depend on at least texture_env_combine in practice and that adds the ADD operation by itself. In theory we could perhaps use texture_env_add when texture_env_combine isn't available, but it doesn't seem worth it at this point.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2015-02-26 um 10:25 schrieb Henri Verbeet:
Right, we actually depend on at least texture_env_combine in practice and that adds the ADD operation by itself. In theory we could perhaps use texture_env_add when texture_env_combine isn't available, but it doesn't seem worth it at this point.
Fwiw, the only GPU I know of that doesn't at least have texture_env_combine is my ancient ATI Mach64 GPU. I agree that it's not worth the effort.
The Mach64 DRM module never made it into the kernel, afaik the Mach64 DDX driver is abandoned and the the mesa parts were removed from Mesa 8.0.