[Bug 20380] Heroes of Might and Magic III hangs

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Oct 24 13:00:16 CDT 2009


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





--- Comment #30 from Roderick Colenbrander <thunderbird2k at gmail.com>  2009-10-24 13:00:15 ---
The bug likely occurs only for dibsections. I'll give a short summary of what
the patch changed and perhaps were to look for the issue.

Most of the time your Xserver runs at 24-bit. One limitation of X is that it
doesn't allow you to render e.g. 16-bit data to a 24-bit window. Windows allows
this. When a program wants to use this depth (e.g. for dibsections) we perform
depth conversion. This means that we render at 24-bit and when a programs reads
the data back we convert 24-bit back to 16-bit.

I suspect that Homm3 is using a depth of 16-bit. Internally wined3d then uses
16-bit dibsections for the rendering. During a Blt in wined3d we call gdi
functions like BitBlt to render the surface to the screen.

The XRender extension allows depth conversion, so using that we can blit 16-bit
data to a 24-bit Window which isn't possible using plain X11. The patch which
broke Homm3 allows dibsections to be created in 16-bit (and other depths)
without having to do any depth conversion in software (that happens in dib.c /
dib_convert.c).

It is hard to say where the problem is but I guess that when using the depth
conversion code we were performing some locking and that right now we are
trying to access the data from two places at the same time or so. Figuring what
is wrong is hard though it could be in wined3d, winex11.drv/dib.c bitmap.c or
xrender.c.

So basically I think that the XRender code is good but that it uncovered some
new bug.

Roderick

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