[Bug 11584] Recent patch breaks Call of Duty 4

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Apr 10 05:25:35 CDT 2008


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


Tiemen Schreuder <tietmen at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tietmen at hotmail.com




--- Comment #32 from Tiemen Schreuder <tietmen at hotmail.com>  2008-04-10 05:25:35 ---
Tested the four cases and the combination of the patch and your suggested
change ('check') seems to work alright too. The patch is required to prevent
stack overflow tho, the check should increases performance slightly, although
not noticeable for me in game.

In the long run, making sure FindContext never leads to (re-)activation seems a
more elegant solution (but in effect similar to current patches). Unfortunately
I know very little about DirectX, but looking through the code the only reason
ActivateContext is called from read_from_framebuffer_texture is seemingly to
set the 'usage' to something else, not to actually activate it. How about (yes,
this is probably a bit rash) a seperate function for that? So:

ActivateContext(..,usage)
 -..stuff (find context, preload, read_from_framebuffer)..
 -SetContextUsage(.,usage) [instead of switch statement]

read_from_framebuffer_texture
 -..stuff..
 -SetContextUsage(.,BLIT) [instead of ActivateContext]
 -..stuff.

SetContextUsage(.,usage) [new function]
 <current code from ActivateContext usage switch statement>

I can test if it works if you want, however considering the size of the change
(not in time to apply, but in possible undesirable side-effects) I rather wait
till you've given it a quick glance in case there are any obvious errors.


-- 
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