[Bug 27534] Call of Duty 4 MW: Graphical glitches when shooting

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Aug 8 07:41:02 CDT 2011


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

--- Comment #41 from Stefan Dösinger <stefandoesinger at gmx.at> 2011-08-08 07:41:01 CDT ---
(In reply to comment #40)
>  * Not calling GLflush was introduced by the commit in comment #0 or it was a
> hidden problem already before? Or the commit just speed some part up and made
> this visible on SMP machines?
It has been a hidden problem before, and it might cause the problems on
fglrx(haven't tested that, just a guess). The GL_ARB_map_buffer_range commit
just made is use opengl buffers for more vertex buffers, so the problem was
uncovered.

>  * Do we (you;) know why comment #21 & comment #25 fixes the issue?
25 is easy: It reverts to not using opengl buffers for most dynamic d3d
buffers. That way the application just writes data into a system memory
location managed by Wine. After unlock the data is in there. When the other
thread draws from this d3d buffer it looks like a draw from system memory for
opengl. The drawbacks are that the data is uploaded right before the draw
rather than in parallel, and that opengl has to make some effort to figure out
which data to grab from wined3d's memory before it returns from the draw call.
Those are generic issues which lead to the introduction of dynamic buffers to
the d3d and gl APIs. Since the flush calls are so horribly expensive we don't
see any advantage from dynamic buffers in this game however.

21 is harder to answer. I don't know, but I suspect it has something to do how
the driver handles INVALIDATE_BUFFER_BIT vs glBufferData(NULL) + map + unmap
internally. That #21 helped lead me into a wrong direction.

>  * Should i remember that there are two issues (for future use;) or is it
> already shrinked to one not calling issue?
No, it looks like this bug was caused by the missing flush alone.

I'll send the patch to wine-patches once AJ is back from vacation.

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