[Bug 11584] Recent patch breaks Call of Duty 4

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Apr 10 04:35:41 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=11584


Stefan Dösinger <stefandoesinger at gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1




--- Comment #31 from Stefan Dösinger <stefandoesinger at gmx.at>  2008-04-10 04:35:41 ---
As far as I can see the problem will occur when the app switches threads while
rendering to an offscreen surface. In that case it will try to alloc a texture,
which calls activatecontext with lastActiveRenderTarget. Thus it works fine on
render target switches, but on thread switches it fails because the new thread
number isn't assigned yet.

This PreLoad call should be removed at all. The other one is needed, but this
one here is at the wrong place. I am not sure why I added it there. Maybe it
was a workaround for a bug elsewhere then we should track it down. If it is
really needed it should probably be moved to SetRenderTarget rather than
ActivateContext, or the recursion has to be prevented.

The other PreLoad needs some safeguards as well. For reading back on a target
switch it works because the readback will activate the context for the
old(current) render target, and since the new render target is set after
FindContext it works as intended. If there is a thread switch we wouldn't have
to read back at all, so we should make sure readTexture is only set on a target
switch. However, there's still the issue if the thread and target are switched
at the same time. In this case we have to activate the old target for the new
thread, read back, then activate the new target for the new thread.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the wine-bugs mailing list