http://bugs.winehq.org/show_bug.cgi?id=13954
--- Comment #15 from Alexander Dorofeyev alexd4@inbox.lv 2008-06-29 10:44:23 --- (In reply to comment #14)
Is this a recorded Wine bug? If so, presumably this bug should be reported as a duplicate of the corresponding Wine/opengl bug.
Uh, no, I wasn't referring to anything in particular besides the obvious. Just saying that apparently gdi way of doing this works but opengl doesn't (for whatever reason), so you can test with DirectDrawRenderer=opengl to see the problem immediately in games like Thief.
Unfortunately I've no idea what render target locking is (Google suggests to me that it's a Direct3D feature that Wine's had problems with in the past), and I'm not a graphics programmer (I tend to deal with embedded systems instead). Can we pin this issue down to either a Wine specific bug or a particular ATI driver bug?
Well unless you plan to hack Wine's d3d code, I already told you all you would need to know about RT lock mode - it is controlled by RenderTargetLockMode key and influences this kind of games a lot. So whenever you have problems, it's desirable to test with several RT lock mode settings. Doing so can produce various interesting results, from making the game work, thus giving a usable workaround (it will not mean there is no bug though, but at least game may be usable) to providing some clues into the nature of the problem. The key and its various settings is documented heer: http://wiki.winehq.org/UsefulRegistryKeys. At the moment it's enough to test readtex and readdraw (default = auto = readdraw), because the rest are not fully implemented anyway. Roderick Colenbrander also created another interesting page here: http://wiki.winehq.org/DirectDraw that goes further into technical details.
At the moment it's not very clear where the bug is, although most likely in ATI drivers. Testing the already mentioned RT lock modes may isolate the problem somewhat. Some additional things that may be tested to further narrow it down:
1) testing some opengl samples available on the net that use glDrawPixels (that's basically the call which draws stuff to the screen in Thief menu for example). If it's broken in the driver, then maybe these samples will also not work. Google +glDrawPixels +sample for some free open source samples.
2) checking what happens if you disable PBO. this means you open winesource/dlls/wined3d/directx.c, find the first line with "pixel_buffer_object" and comment it out, then build wine.