[Bug 35655] Wined3d performance drop

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Feb 23 16:22:41 CST 2014


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

--- Comment #1 from Ken Thomases <ken at codeweavers.com> ---
Yes, I can confirm this.

The problem is the code added to context_enter().  In the ideal case, the
outermost context_enter() will find that the wined3d context is still current,
and its OpenGL context is the still the current OpenGL context.  (That is, the
app is neither using WGL nor working with multiple wined3d devices or
swapchains on the same thread.)  For that ideal case, context_enter() used to
just call context_get_current() to query the current wined3d context and
wglGetCurrentContext() to query the current OpenGL context.  After my commit,
it also calls GetPixelFormat().  That additional call is relatively expensive
and it's being called a lot, at least for some of the 3DMark 2000 benchmarks.

Unfortunately, it's necessary for correctness.  Admittedly, the problem it's
solving is relatively uncommon, so the performance hit probably outweighs the
correctness.

However, there are already plans[1] to further change how wined3d works and
they will remove the need to call GetPixelFormat() so often.  I think the best
solution is to move forward on that.  (Those plans, though, won't help for when
wined3d is used on Windows.  Then again, the performance characteristics of
GetPixelFormat() may be radically different on Windows.)

Speaking of, the other thing we could do is investigate why Wine's
GetPixelFormat() is expensive and make it faster.


[1] The WGL_WINE_surface extension proposed in
http://www.winehq.org/pipermail/wine-devel/2014-January/102637.html

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