http://bugs.winehq.org/show_bug.cgi?id=10697
--- Comment #10 from Michał Kazior kazikcz@gmail.com 2007-12-23 16:41:36 --- I decided to check out the sources myself (even though I have absolutely no idea about Direct3D nor OpenGL programming) and played around. Here are my notes:
RenderTargetLockMode - textex/readtex: In the d3dfmt_get_conv() function (line ~1402) the condition: --- if( !(GL_SUPPORT(EXT_PALETTED_TEXTURE) || (GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && p8_render_target)) || colorkey_active || (!use_texturing && GL_SUPPORT(EXT_PALETTED_TEXTURE)) ) { --- .. is never true for me, and neither is the next one. This causes format, internal, type, target_bpp and convert to be left unset. If I change it to: --- if (1) { --- .. then StarCraft renders correctly, however the game is actually slower than in GDI mode! There can be barely seen any movement in the main menu. If I start, for example a custom game, it gets faster, until I try to move something. The more moving/animating objects, the slower things get.
RenderTargetLockMode - auto: This one segfaults right after entering the game main menu. I traced the thing, and it seems something's messed up with PBOs. After inspecting the code, I came to conclusion, that a PBO gets created after a few *_LockRect. However, when the UnlockRect is issued afterwards, it frees the PBO, the This->resource.allocatedMemory is set to NULL and is never recovered (and the PBO is never retrieved, or so I guess), thus --- trace:d3d_surface:d3dfmt_convert_surface ((nil))->(0x2c60028),(640,480,2560,1,0x1886b0) --- .. is issued and crashes the whole thing.
I'm pretty tired since it's rather late here. Nevertheless, I hope it will shed a light on this issue. I'll also attach the 'trace+d3d_surface' results.