https://bugs.winehq.org/show_bug.cgi?id=40306
Bug ID: 40306 Summary: Overexposed/wrong gamma? on The Legend of Heroes Trails in the Sky SC Product: Wine Version: 1.9.5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: kq3thih@mailnesia.com CC: hverbeet@gmail.com Regression SHA1: 5647fffb83ea8b6ef5d63a4528128085deb54cba Distribution: Other
Colours look blown-out/overexposed on 1.9.5 in The Legend of Heroes Trails in the Sky SC.
--- system info --- SolydK 8 Kernel: 3.16.0-4-amd64 x86_64 (64 bit) Card: NVIDIA G80 [GeForce 8800 GTX] GLX Renderer: GeForce 8800 GTX/PCIe/SSE2 GLX Version: 3.3.0 NVIDIA 340.76 --- system info ---
Bisecting returns:
--- snip --- 5647fffb83ea8b6ef5d63a4528128085deb54cba is the first bad commit commit 5647fffb83ea8b6ef5d63a4528128085deb54cba Author: Henri Verbeet hverbeet@codeweavers.com Date: Fri Feb 12 18:52:22 2016 +0100
d3d8: Disable WINED3D_SRGB_READ_WRITE_CONTROL.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
:040000 040000 4253555e555391cf23309a96079829f90c437692 fc4bfeb1ff0801729711cda08a4e79a7282f25bd M dlls --- snip ---
Reverting this commit on master, synced 2016-03-13, does fix the issue.
https://bugs.winehq.org/show_bug.cgi?id=40306
Aexander kq3thih@mailnesia.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=40306
--- Comment #1 from Henri Verbeet hverbeet@gmail.com --- This doesn't have a demo or free download that can be used to reproduce the issue, right? Could you attach a WINEDEBUG=+d3d_texture log?
https://bugs.winehq.org/show_bug.cgi?id=40306
--- Comment #2 from Aexander kq3thih@mailnesia.com --- Created attachment 53952 --> https://bugs.winehq.org/attachment.cgi?id=53952 wine-1.9.5 d3d_texture log
No demo that I know about. When starting the game there is a short initial loading screen that has the colour problem, but let me know if you want me to keep logging until I load a save.
https://bugs.winehq.org/show_bug.cgi?id=40306
--- Comment #3 from Henri Verbeet hverbeet@gmail.com --- It doesn't appear to be using any sRGB formats at least. Do you know if this happens to other Direct3D 8 applications? Could you attach a WINEDEBUG=+tid,+d3d log next?
https://bugs.winehq.org/show_bug.cgi?id=40306
--- Comment #4 from Aexander kq3thih@mailnesia.com --- Created attachment 53954 --> https://bugs.winehq.org/attachment.cgi?id=53954 wine-1.9.5 d3d,tid log
Just the first game. Don't know of a demo for that one either.
https://bugs.winehq.org/show_bug.cgi?id=40306
--- Comment #5 from Henri Verbeet hverbeet@gmail.com --- Created attachment 53957 --> https://bugs.winehq.org/attachment.cgi?id=53957 debug patch
Mostly just a guess, does the attached patch make any difference? (For better or worse.) Are you familiar with apitrace?
https://bugs.winehq.org/show_bug.cgi?id=40306
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |joseph.kucia@gmail.com Ever confirmed|0 |1
--- Comment #6 from Józef Kucia joseph.kucia@gmail.com --- The issue is caused by the default framebuffer which is sRGB-capable (WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB). We should be more careful with enabling FRAMEBUFFER_SRGB, especially for blits to the default framebuffer.
https://bugs.winehq.org/show_bug.cgi?id=40306
--- Comment #7 from Aexander kq3thih@mailnesia.com --- First I've heard of apitrace. I did manage to compile it.
The patch did fix the issue.
https://bugs.winehq.org/show_bug.cgi?id=40306
--- Comment #8 from Henri Verbeet hverbeet@gmail.com --- Created attachment 53963 --> https://bugs.winehq.org/attachment.cgi?id=53963 patch
(In reply to Aexander from comment #7)
The patch did fix the issue.
Right, that would be consistent with what Józef said. I don't know to what extent he has already debugged this, but the specific case I was concerned about is the one in context_apply_clear_state(). In that case the attached patch should also work.
https://bugs.winehq.org/show_bug.cgi?id=40306
--- Comment #9 from Józef Kucia joseph.kucia@gmail.com --- (In reply to Henri Verbeet from comment #8)
Created attachment 53963 [details] patch
This patch should be enough. It has only one issue, fb->render_targets can be NULL when device_clear_render_targets() was called to fill depth/stencil surface.
https://bugs.winehq.org/show_bug.cgi?id=40306
--- Comment #10 from Aexander kq3thih@mailnesia.com --- (In reply to Henri Verbeet from comment #8)
In that case the attached patch should also work.
Yes, it does.
https://bugs.winehq.org/show_bug.cgi?id=40306
--- Comment #11 from Henri Verbeet hverbeet@gmail.com --- (In reply to Józef Kucia from comment #9)
This patch should be enough. It has only one issue, fb->render_targets can be NULL when device_clear_render_targets() was called to fill depth/stencil surface.
Yeah, running the tests would have caught that...
https://bugs.winehq.org/show_bug.cgi?id=40306
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |cb9704a979747c31e856b755a02 | |6e6b892d2b9e0 Status|NEW |RESOLVED
--- Comment #12 from Józef Kucia joseph.kucia@gmail.com --- http://source.winehq.org/git/wine.git/?a=commit;h=cb9704a979747c31e856b755a0...
Marking fixed.
https://bugs.winehq.org/show_bug.cgi?id=40306
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.7.
https://bugs.winehq.org/show_bug.cgi?id=40306
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pe.we.psi@gmail.com
--- Comment #14 from Józef Kucia joseph.kucia@gmail.com --- *** Bug 40218 has been marked as a duplicate of this bug. ***