http://bugs.winehq.org/show_bug.cgi?id=35718
--- Comment #32 from Ken Thomases ken@codeweavers.com --- Created attachment 47937 --> http://bugs.winehq.org/attachment.cgi?id=47937 Another try at deferring recreation of the drawable
Thanks, everybody, for the testing with attachment 47883. The fact that it helped with some games is useful to confirm my theory of the problem. I don't think it's the proper solution though.
I've attached a revamped version of attachment 47808 (with the diagnostics from attachment 47866 included, too). Since that didn't fix the problem for most of you, this probably still won't fix the problem. But I've added more debug tracing to hopefully help explain why.
So, please apply this patch on top of current git (wine-1.7.15-133-g62f7ba2) and collect another +tid,+d3d,+wgl log. Again, exit the game as soon as you see the problem (or are sure it's gone) to keep the log short.
I don't expect this to help with the CS:GO problem, so no need to retest that.
Thanks!
For those interested, the theory behind this patch is to decouple the thrashing of the pixel format from the destruction and recreation of the drawable in the X11 driver (as described in comment 23). When the pixel format is changed, the X11 driver now makes note of that but doesn't recreate its drawable immediately. Instead, it waits until the drawable is truly needed. At that time, if the pixel format has been changed back so that it's compatible with the drawable again, then the drawable is just kept as-is.