Closed 18woldemar closed 5 years ago
could you show a screenshot ?
Screen (Gallium Nine) http://priscree.ru/img/ae569896c43e8a.png Screen (WineD3D) http://priscree.ru/img/28db32e000f9a1.png
@18woldemar, what is the Mesa3D version that you use?
I'm currently with mesa-18.1.3 on HD5670 (Redwood Evergreen, uses r600 driver) and I do not see difference in the fog between the Nine and WineD3D. Using Steam version of GTA-SA.
I think it might be interesting if you can do an apitrace with the jetpack. Use latest msvc git build for apitrace. The last release is quite old and can't capture GTA-SA.
My favorite method for capturing is putting the d3d9.dll wrapper library in the game directory, setting override for "d3d9" to "native,built-in" in winecfg->libraries. Then just running the game. (Don't forget to remove the d3d9.dll after you are finsihed, or traces will fill your hdd).
You can replay the trace with Nine or WineD3D and be sure the difference is because of different rendering, not because the game uses different code path.
It would be a lot trickier problem if it renders properly on r600, but has issue on radeonsi.
I'm using version 1.0 US HOODLUM. The reason for this bug was found out. It was a SkyGFX mod. Without this mod, game plays flawlessly. https://gtaforums.com/topic/750681-skygfx-ps2-and-xbox-graphics-for-pc/ I'm using Mesa 18.3.0-devel.
Trace with mod https://yadi.sk/d/AVIHEcHT3ZznTb
I can confirm that I do not see the fog when replaying the trace with Gallium Nine, but I do see it with WineD3D.
It means this is not driver specific bug. This should make it easier to fix.
I hope you don't mind if we upload the sample to the Nine ftp and keep it for regression testing.
Okay)) Do anything with it.
Thank you very much)
Another, more detailed trace https://yadi.sk/d/hRP6S8jY3a2qsi Do anything with it))
I looked at the trace, but It's pretty hard to debug because the back buffer format is D3DFMT_A2R10G10B10 and apitrace won't allow me to see the content.
Would it be possible to take a new trace with A8R8G8B8 ? if there is any way to set it.
Second, do the pattern also appear when looking at the tree regions ? It looks like there aren't much items there. To isolate the issue, ideally there would be a few frames displaying the issue with very few items on screen.
To make the trace execute faster (debugging requires relaunching the trace a lot of times ), the trace has to show the problem as fast as possible with as few frames as possible. It could make a difference to reduce the speed of your graphic card, which you can do with: sudo chmod ugo+w /sys/class/drm/card0/device/power_dpm_force_performance_level echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level
then to return to normal speed echo auto > /sys/class/drm/card0/device/power_dpm_force_performance_level
You may have to replace card0 with card1
@aap maybe you know something of that (sorry if otherwise)
Hm, for reference to the others, i'm the author of said mod (skygfx). For the SAMP multiplayer mod i had to tamper with the fog settings a bit but usually they shouldn't be touched unless SAMP is loaded. Could have something to do with that maybe: https://github.com/aap/skygfx/blob/master/src/main.cpp#L80 Otherwise, try disabling the building pipe hook and see if that changes things. Maybe using a pixel shader somehow breaks fog?
Given for the same trace the fog appears right with default wine, but not right with nine, the issue is not in the mod, but in nine where there must be a missing corner case unhandled.
There seems to be only one pixel shader used for all objets affected by shadows, thus I was able to investigate the issue. It seems nine incorrectly compute the depth used for fog effects in some scenarios. I need to make some tests to be sure of the correct formula and not trigger regressions.
The bug should be corrected by: https://github.com/iXit/Mesa-3D/commit/633047fab15daa5ad387035d4667b4a21c2ea054
At least the trace seems fine to me.
I applied the patch and tried few older games that are more likely to use fixed functions. I did not hit any visible regressions.
During the game GTA San Andreas, noticed the lack of fog on the horizon. It looks bad because of that. Please fix this. Operation System: Kubuntu 18.04.1 amd64 GPU: AMD Radeon HD 8670M (Hainan) CPU: AMD A4-5000 If you need logs, contact me))