View Single Post
Old 04-16-12, 12:13 AM   #11
Registered User
Join Date: Jul 2011
Location: Moscow, Russian Federation
Posts: 58
Send a message via ICQ to lexa2 Send a message via Skype™ to lexa2
Default Re: Regression in "KB:The Legend" when run under Wine with drivers v.285.05.09

Unfortunate followup: well, the idea I've been thinking of when asking previous question turned out not to be related to this bug.

Here is a long story about apitrace vs. this bug.

Prior to filing up a report to Wine's bugzilla I had tried to record apitrace logs demonstrating the problem with driver versions 275.09.07 and 285.05.09. It yielded to a pretty interesting results.

In case you don't know what the apitrace is, it is an app that allows to capture virtually all calls an app does to libGL alongside with the data passed to that calls (textures, e.t.c.) and writes captured data to a special log file that can be "replayed" later at any time you need. Thus for our case it is possible to take the Wine out of consideration and stick with linux-native glretrace binary that does "the magic" replaying problematic sequence of libGL calls.

To record the trace I had installed 285.05.09, started up problematic app and checked if the bug happens. It had been in place, so I proceeded with recording an apitrace log illustrating problematic behavior, and then killed Xserver, installed driver 275.09.07 and recorded another trace illustrating behavior without this bug. Then I tried to replay apitrace log recorded with drivers 285.05.09 to see if it would show incorrect rendering results under driver 275.09.07. During the replay process there was a problem related to a fact that driver 275.09.07 unable to properly handle SRGB texture format that was used under 285.05.09 which resulting in somewhat dark render results, but except for this everything else seemed to be rendered correctly.

So I went on and re-installed driver 285.05.09 and tried to replay apitrace logs with it. It had turned out that this bug doesn't happen immediately after the Xserver startup - replaying problematic apitrace log in a loop for about 5 minutes (while /bin/true; do /misc/Raid5/Software/apitrace/bin/glretrace ./kb-thelegend-nvidia-285.05.09-full.trace ; done) right after the X startup produced correct rendering results. At first it made me into thinking that an app somehow manages to corrupt the driver state so it starts to misbehave, and that this corruption most probably happens some other way than simply using libGL calls. Thinking about it I had stopped trace playback loop with a Ctrl+C press and posted a message to this thread you can read above.

Right after that posting I had tried to start up the trace playback loop once again - and viola!, the bug shown itself up. No Wine, no original app, just a small native glretrace binary + trace log + wait some amount of time to pass since X server startup - and that's enough for bug to appear. As a side note, as soon as bug appeared - it affected glretrace playback of both traces, including one recorded under 275.09.07 driver.

Long things short, now it's obvious that this bug is really a bug in drivers and not in Wine as it can be reproduced by retracing problematic libGL call sequence. Question is, what should I do to help nVIDIA track this one down? I could upload problematic traces to my personal web-server so they could be fetched by nVIDIA engineers from there, but the files itself are pretty big (~200MB each) and I'm not sure if nVIDIA corporate policy permits downloading arbitary files from third-parties.
lexa2 is offline   Reply With Quote