[Bug 34263] New: Framebuffer read-before-write causes graphical glitches
http://bugs.winehq.org/show_bug.cgi?id=34263 Bug #: 34263 Summary: Framebuffer read-before-write causes graphical glitches Product: Wine Version: 1.7.0 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs(a)winehq.org ReportedBy: achurch+wine(a)achurch.org Classification: Unclassified Created attachment 45608 --> http://bugs.winehq.org/attachment.cgi?id=45608 Suboptimal but functional patch In at least the Final Fantasy XIV: A Realm Reborn character creation benchmark (http://na.finalfantasyxiv.com/benchmark/index.html), framebuffer read-before-write results in graphical glitches such as the entire display or UI overlays flickering or incorrect textures being drawn. This program uses multithreaded rendering (though I don't know whether that's relevant), and in some cases, Direct3D calls which get translated to glBlitFramebuffer() attempt to read from a framebuffer before the GPU has finished rendering to it. The cause was found by dumping OpenGL calls using apitrace (https://github.com/apitrace/apitrace) and observing that replaying the same frame sporadically caused the same sort of glitches as observed in Wine, but the glitches went away when a glFinish() call was inserted at each thread switch. The attached patch fixes these glitches by inserting a glFinish() call before each glBlitFramebuffer() call. This is almost certainly suboptimal, and in my case it causes the benchmark result to drop from ~3500 to ~3000, but it fixes all graphical glitches aside from black squares seen in some cases when the HDR option is enabled in rendering settings. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34263 --- Comment #1 from Andrew Church <achurch+wine(a)achurch.org> 2013-08-13 16:47:34 CDT --- I should note that the patch will probably cause crashes on the Mac because it adds new function pointers but only sets them in the X11 driver. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34263 --- Comment #2 from Henri Verbeet <hverbeet(a)gmail.com> 2013-08-14 02:10:01 CDT --- Yeah, that's a known issue with multi-threaded D3D applications at the moment. In principle setting the "StrictDrawOrdering" registry key is supposed to help, although it may not be enough. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34263 --- Comment #3 from Andrew Church <achurch+wine(a)achurch.org> 2013-08-14 12:31:00 CDT --- Thanks for the note. FWIW, I tried setting StrictDrawOrdering on unpatched wine-1.7.0 but it doesn't seem to help much; there are perhaps fewer cases of the wrong texture getting drawn, but the flickering is just as bad with StrictDrawOrdering as without. (And the benchmark performance dropped to ~2800, compared to ~3000 with the attached glFinish() patch, just as a point of comparison.) In case it's worth anything, it seems like the glFinish() call added by my patch in swapchain.c affects only the flickering, and the glFinish() calls added in surface.c affect only the wrong-texture glitches. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34263 Jari Vetoniemi <mailRoxas(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mailRoxas(a)gmail.com --- Comment #4 from Jari Vetoniemi <mailRoxas(a)gmail.com> 2013-08-28 01:00:19 CDT --- With this patch, the flickering still occurs if __GL_THREADED_OPTIMISATIONS=1 is enabled for nVidia Linux driver. (Not as severely however) I'll check out apitrace dump when I get home. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34263 rmlipman(a)gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rmlipman(a)gmail.com -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34263 Brian Nguyen <mtxcoll(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtxcoll(a)gmail.com --- Comment #5 from Brian Nguyen <mtxcoll(a)gmail.com> --- Created attachment 47921 --> http://bugs.winehq.org/attachment.cgi?id=47921 Updated patch -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34263 --- Comment #6 from Brian Nguyen <mtxcoll(a)gmail.com> --- As a heads up, I found the 2013-08-13 16:30 patch no longer applies cleanly to ToT wine as of 3/29/2014 (commit f3488d0fea8d8d2d803ba89ccce2b7dd0ed4165c). I manually resolved the conflicts and found the attached 2014-03-29 16:45 patch works for me. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34263 Ken Thomases <ken(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #47921|0 |1 is patch| | -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34263 Brandon Corujo <haku08879(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |haku08879(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=34263 tangx246(a)umn.edu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tangx246(a)umn.edu -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34263 Luke Bratch <luke(a)bratch.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |luke(a)bratch.co.uk -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34263 Sergey Isakov <isakov-sl(a)bk.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |isakov-sl(a)bk.ru --- Comment #7 from Sergey Isakov <isakov-sl(a)bk.ru> --- Created attachment 55229 --> https://bugs.winehq.org/attachment.cgi?id=55229 Black image in real windows Real Windows 7 has exactly same bug. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34263 joaopa <jeremielapuree(a)yahoo.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree(a)yahoo.fr --- Comment #8 from joaopa <jeremielapuree(a)yahoo.fr> --- Does the bug still occur with wine-5.14? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34263 --- Comment #9 from Andrew Church <achurch+wine(a)achurch.org> --- The bug does not seem to occur under Wine 5.14. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34263 --- Comment #10 from joaopa <jeremielapuree(a)yahoo.fr> --- Can the reporter (or an administrator) close this bug as FIXED? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34263 Andrew Church <achurch+wine(a)achurch.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #11 from Andrew Church <achurch+wine(a)achurch.org> --- Done. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=34263 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #12 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 5.15. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla