On 28 October 2014 00:43, Joachim Priesner joachim.priesner@web.de wrote:
Wine clamps the oFog output of vertex shaders. Tests for the flag follow in the second part of this patch.
Why is it better to add the flag instead of just removing the clamping?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-10-29 12:23, schrieb Henri Verbeet:
On 28 October 2014 00:43, Joachim Priesner joachim.priesner@web.de wrote:
Wine clamps the oFog output of vertex shaders. Tests for the flag follow in the second part of this patch.
Why is it better to add the flag instead of just removing the clamping?
If my theory is right and the clamping originates from a hardware limitation on dx8 cards, it is more likely that there's a d3d8 game that needs the clamping than that there's a d3d9 game that profits from the opposite behavior.
On 29 October 2014 13:01, Stefan Dösinger stefandoesinger@gmail.com wrote:
If my theory is right and the clamping originates from a hardware limitation on dx8 cards, it is more likely that there's a d3d8 game that needs the clamping than that there's a d3d9 game that profits from the opposite behavior.
Having less shader instructions is a good thing, although clamps tend to be pretty cheap. But to me it seems a little shaky to justify this based only on the fact that some d3d8 application might regress. It would perhaps be a different story if e.g. this was always set in practice on common hardware.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-10-29 13:31, schrieb Henri Verbeet:
Having less shader instructions is a good thing, although clamps tend to be pretty cheap. But to me it seems a little shaky to justify this based only on the fact that some d3d8 application might regress. It would perhaps be a different story if e.g. this was always set in practice on common hardware.
Radeon cards set the flag and clamp, Nvidia cards don't clamp and don't set the flag.
I did some git archeology, and it turns out the clamp was deliberately added by patch 2d810bdc892fc028d4180066c46649709058267f. Matteo, do you remember if this fixed a particular game?
Another factoid is that Microsoft's WARP renderer seems to clamp in d3d8, but not d3d9. That's another indication that there is some d3d8 game that depends on it.
On 29 October 2014 14:09, Stefan Dösinger stefandoesinger@gmail.com wrote:
I did some git archeology, and it turns out the clamp was deliberately added by patch 2d810bdc892fc028d4180066c46649709058267f. Matteo, do you remember if this fixed a particular game?
I think the background on that one is mostly just https://bugs.winehq.org/show_bug.cgi?id=10477#c25.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-10-29 14:21, schrieb Henri Verbeet:
On 29 October 2014 14:09, Stefan Dösinger stefandoesinger@gmail.com wrote:
I did some git archeology, and it turns out the clamp was deliberately added by patch 2d810bdc892fc028d4180066c46649709058267f. Matteo, do you remember if this fixed a particular game?
I think the background on that one is mostly just https://bugs.winehq.org/show_bug.cgi?id=10477#c25.
Looks like it, yeah. Though it is not clear to me if adding the clamp actually fixed anything. I'd say that the windows drivers' (apparently repeated) change of behavior is reason enough to leave the clamping alone unless a real benefit of removing it can be shown.