Re: [1/2] wined3d: Set D3DPMISCCAPS_FOGVERTEXCLAMPED flag in get_device_caps
On 28 October 2014 00:43, Joachim Priesner <joachim.priesner(a)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(a)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.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJUUNcYAAoJEN0/YqbEcdMwEk4P/jaaW+ry+wXXCh0VszcxRPax ilLxLcA9MoruSBAeXIGteypCFXNcwTM92qAJQuTGstqdRHVbJgEv0PO5mzpdelj/ I8j8nJmpXWC8FWeFzZRDDZz5ooVmkPrPyyv0CjZci0b/gjyUvoVdKpnDIFuhhRoJ 4tkphKdPuviYzBCGIQHRlX4uc2PePSwo02AT7LezWRuB68owlO5DPp2LkXiXgHP5 qGuEPoeO7x6/Qpmse7rC95SFri3xFm5lqUJi9kj8Nof1twTh7YjpNq0mqFJP7/lT 3lYRKw5KfMBkxD9O4EnG8gH2sH1EbFmTaTMsY4iApco8VOo7h/wrVwH5G3BsvMBE qjdu2lPGCNGXSrLNnPLeyvf9zxAb5uvketXki4XQ/+Mnai3rAflRXqbQWwYmtGVL ZG+Yb1JRK5jx8vuqN01FULPNAijz6Q6Qm/D+UhiEmdWtQOYP+aiYqWZFpcpuByjB uFp05a1AHLTr+1m/HC4pm1LQMd2BFvgvHOVGf25bs/dCObtdhRFAoAjf35Ar3clX juOwjL8V002P1tqDyxu+Qpm8bpcykWrWRAn4DAhHF1dQ0V5hKq/4BR2SAqeztcTB yazVdvQcdnVXKz3ITC4wZktJ7kcIYAi7OnbnYraLHoSxKLMwSxPoXfCoC5KQISz9 1lf1B9lccsXEdBVLkIg7 =CVod -----END PGP SIGNATURE-----
On 29 October 2014 13:01, Stefan Dösinger <stefandoesinger(a)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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJUUOcAAAoJEN0/YqbEcdMwgMAP/iAoM3XU/0tONVLRQvrE9MH6 q85CqNKr243AW/d6k8AfcWcw9Djrym/Gznl9+Jai6u1oRCEycP3qb+JHI+7/IBSm sO3A1XEpSE/N+Qs3uZ1jcXn++XFzY8NTv8pJiE95OeXqvPdKjrtZnldTLpycQBxp WQzrileFppc+cuooj+10FTIJH41bQ+5/JW3VOWPak5XyTv801wEodKfQ9dw2HTxw 7cEWC4U/Xzh4tskAoWofgedXRvXYdSEJ89zH7JgSl1gV+OH7iWzBiXG1LpjEs/WK IoHsQ/hwmcYU7S+ig3avPWO37CqwnMpCynWIiRKOngu8G92MD1Rs2RIqNwyYJcRF rLMdv6MNMBVQoATmfpZRBA+K9nnOBjiK+Qi8MsYm3ZXc8+Z3c1ZM8tfW/fQfDu8P XHjeTyMdQnUMhD539OTZk7HcHYOtfRvQGnSbNtpLs9g4M+v94AVccV2CSBX4Ys+l MJRIiy3uu5tR42tSsv4I2n2p4AC5n6NZ33ja52EcuefxK85ay6f+Y9E9gcqKzW8V a3o+SkVLpgZsxV0XgCOWApS+x8OiADqwWjRb1QpEdYtuwd44fMyFB+NihMc3bO6R wXubAke7Mr9FtB6vICJ6DuL5pfc0SXoD5u/BAIOU7Mhu43E+4dCXzTpTEPuiV8Iq ADEdBUY5iYBriMcxX9E3 =rzEn -----END PGP SIGNATURE-----
On 29 October 2014 14:09, Stefan Dösinger <stefandoesinger(a)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(a)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.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJUUO6FAAoJEN0/YqbEcdMwtagP/0ykjQbh6Ult2I2889yQTQ6H b6lngkbpHd7ajYXv4Jp0MTZQ/k3OuvCA3uhSizWuXHTyLnuKczcC5B09UD7/63+4 P8l+NVTkP3eqqM14CxzwDcJ6PX2DaEYUhFj2IPKDvDRPgGSx+UjV7CgnAl9qVN9A vScz5sDGxz6BEHe97ysvFIzRUeF7UywBpXZ5rBRcckfvj195ZwY4RuEjm3nKCU2w ValdKa2dKkwfagNVtDrkEjrJKOkKc/DObWmwHhCn4ADLTp0TvYfN3YdsV1XTScjm 4aDSFBj2aK5k9GeKcy5vEhB3UpqbGBF5S/HuO0eisp53XyHpK4oG4kL2AE0A3Ba/ TzwSAxHlzWMrRwxTvh2apiBZFxi/N6AtV2xEe6uGE1YvpqYkVeSsxEiZuBE0dMW2 lulP7c6dPWGJXDEti06sDnbW8WQQDjhaSH+xkavTGEga3gQaBVqT6WFiNuUS2477 em9e6UTBYxh2BQwxopf3eOkZgU50cW5785QnkW9HWbJBV7D8TZfi/g6t0KQumAbH PzuklO2S+JedKHpjjkyCYqJsGRMvMja0LlxEJmE+sriz+scFm4nmR4N57SOkLT1N mWqO07zudQSdKk9qwIzQiMviFcOpjUm9uLkUL1+Ei+YtVft06bYqRwdR3WNaxKnu GeAlu3MzAjCrSb5KaPPY =SN+n -----END PGP SIGNATURE-----
participants (2)
-
Henri Verbeet -
Stefan Dösinger