[PATCH 2/2] wined3d: Activate context for the right target in surface_blt_to_drawable.

Alexander Dorofeyev alexd4 at inbox.lv
Mon May 12 03:50:47 CDT 2008

Vitaliy Margolen wrote:
> Alexander Dorofeyev wrote:
>> Fixes http://bugs.winehq.org/show_bug.cgi?id=12890 that affects several 
>> games locking front buffer when using readtex RT lock mode.
>> ---
>> -    ActivateContext(device, device->render_targets[0], CTXUSAGE_BLIT);
>> +    ActivateContext(device, (IWineD3DSurface*)This, CTXUSAGE_BLIT);
> I think Stefan said something about this not being correct. The blitting is 
> going into the render target not the current surface. In your case if the 
> surface is not the render target, then it's not being properly selected.
> Vitaliy.

Was it about blitting in general or surface_blt_to_drawable? Note that 
this routine isn't for blitting in the usual gdi or directx sense (as in 
from one bitmap or surface to another) - that code is in BltOverride. 
surface_blt_to_drawable is helper function for 
LoadLocation(...,INDRAWABLE,...) - which isn't supposed to be called for 
regular textures or offscreenplain surfaces.

More information about the wine-devel mailing list