[Bug 41930] Civilization III Complete shows black terrain (Wine compiled with OSMesa support)

WineHQ Bugzilla wine-bugs at winehq.org
Tue Feb 25 12:14:57 CST 2020


https://bugs.winehq.org/show_bug.cgi?id=41930

--- Comment #31 from Bryan Varner <bryan at varnernet.com> ---
After a lot of debugging and stepping, I wrote a small win32 app in a Windows 7
virtual machine that mimicked the code paths I was seeing called from Civ 3.

It's pretty clear from messing with this that the app does expect a 565 raster,
and utilizes pre-multiplied alpha for the offscreen opengl raster.

Yay.

But this got me to the blt implementations in gdi32/dibdrv.c. Based on what I'm
seeing, it's like with pre-multiplied alpha it's expecting the blt to not just
overwrite the target bitmap (even though the OP is a copy according to the
debugging...).

What's confusing me now is that in the MSDN docs, I see references to offscreen
dibs blts with tertiary ROPS, but I only see binary ROPS implemented in Wine
code. it _looks_ like the tertiary ROPs funciton on premultiplied alpha, which
is certainly what Civ 3 is expecting here. 

The majority of the offscreen buffer is 0,0,0, with the actual OGL parts being
rendered into 565 RGB but with pre-multiplied alpha transparency. I confirmed
this with screenshots from running in a virtual machine -- where the opengl
rendered bits are translucently blt overtop the destination bitmap (the 2d
isometric terrain).

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