Re: [PATCH 3/5] wined3d: Remove ARB_/EXT_TEXTURE_ENV_ADD.
On 24 February 2015 at 13:38, Matteo Bruni <mbruni(a)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(a)gmail.com>:
On 24 February 2015 at 13:38, Matteo Bruni <mbruni(a)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(a)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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU7uyfAAoJEN0/YqbEcdMwtlYP/1g4d/E4g5dMNI7KinPYbx+Z 9MWhhUcegvC3rwNMMkJPSVSzR1WYbfDQgPCxuhKnMPuzNoa2ypviUuZArR/nhEZv +086ym1icpn0hAI+goDrL/DATcYyilHifM0gV5T64+4ieWMeNGrz8B4Jh3u9Bx3c lSJaKMH/e6Jos2Jp5MG37U97hSpdFsLL83RcQwXln67kMoucJOiqLvYnCDkzaD62 eAYZq8SucsupBGXNY0B6r6Q8/Z/geZsoiy6JzbFbvQgNJpnu1fvR3r4Bh8tejqOs P0WykVLOluHlnTuRMgaJYmr/WNOZAgWm+7YqoruIAlDgUAn9mGX01I6VwitI6xr8 zjoB4n4rhkMNCJy9uz6DC69IiRvqvEuB3KbshBUl6jGbBqxRjvGpz2AHgVzD2yy8 7whj9dtjq0wugI5saM2jSVuspSoVXxdO5igNL4RJLCA/IkPy8xwNvb1+dhzpchYv LAFPLu93Cy/OLA28mTcSfkwnwvbWhgSbBxyFhAaHfO8BDEjTJpDuULrnzs4q6KXb yvhHeIzXbBMVlMOk8PuIjOEEIyJhas7Nea4LJcOFyFs0CLNNpFNKq0UKsOm48Orj 0CHThLenyVwdlm3WDzXfPf2l84gLE8t6ev6SVKn+5EapfMEnDWKvHMkeL43sQ04j vfoFB4Ox+ZX6uZ35MAip =r+WW -----END PGP SIGNATURE-----
participants (3)
-
Henri Verbeet -
Matteo Bruni -
Stefan Dösinger