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

WineHQ Bugzilla wine-bugs at winehq.org
Sat Jul 17 15:30:09 CDT 2021


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

--- Comment #45 from Bryan Varner <bryan at varnernet.com> ---
After adding a bunch of debugging to dibdrv_wglMakeCurrent(...),

I'm quite confident that this is an upstream OSMesa bug.

Complete with a comment contained within osmesa.c,
https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/frontends/osmesa/osmesa.c#L804

The osmesa context is not copying the user-supplied pixel buffer into the
osmesa color buffer when OSMesaMakeCurrent() is invoked. Resulting in an empty
(memset to all 0s) buffer being used.

The color_buffer in osmesa is then copied back overtop the user supplied buffer
during glFlush()
https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/frontends/osmesa/osmesa.c#L359.
This obliterates the previously drawn contents to the device independent bitmap
context, replacing them with the offscreen GL contents, which didn't have the
original buffer copied in prior to the drawing functions.

It's an OSMesa bug.

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