On Mon, Apr 7, 2008 at 2:30 AM, Alexander Dorofeyev alexd4@inbox.lv wrote:
Oh, you are right. Must be fixed some other way then, I guess, maybe moving assignment to isInDraw lower or moving ActivateContext higher. From what I understood from Bioshock bug (http://bugs.winehq.org/show_bug.cgi?id=9973), moving ActivateContext in drawPrimitive produces bugs in other programs, right? Could you add to that bug a short description of what games etc needed to reproduce these problems?
I added a comment to the bug, but I'm afraid I don't really know the details about how to reproduce the problem as I never experienced it. I think Stefan was the one who mentioned the rendering problems in HL2 Lost Coast, so maybe he can give you more details?
On another note, what are the thoughts about leaving these ActivateContext calls the way they are now? As things currently stand, a lot of these calls are only interested in making sure there is an active gl context by doing ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD). This is essentially a NOP if there was a previous call to ActivateContext, so if you have something like:
ActivateContext(device, target, usage); ... ENTER_GL(); ... ActivateContext(device, lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); ... LEAVE_GL();
the second ActivateContext should be harmless, even if it's not ideal from a design standpoint.
- Allan