Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,865
    • Issues 2,865
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 899
    • Merge requests 899
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Issues
  • #5094

Closed
Open
Created Jul 20, 2021 by Bryan Varner@bvarner

OSMesa Gallium frontend disregards (obliterates) user supplied buffer contents.

If applicable

  • Wine/Proton version: (current git master of 6.12)

Describe the issue

Civilization 3 (https://bugs.winehq.org/show_bug.cgi?id=41930) uses WGL on a 16-bit colorspace (5-6-5 BGR) to leverage OpenGL drawing into the device-independent-bitmap context which is used for the 2d graphics within the game.

The current WINE implementation of WGL for the WINE dibdrv uses OSMesa to accomplish the GL drawing.

The OSMesa gallium implementation does not copy the user-buffer into the color-buffer during OSMakeCurrent, resulting in the user-buffer being 'emptied' when the GL rasterization is flushed to the user-buffer.

There is even a comment in the gallium frontend regarding this.

In the screenshot below there should be 2d terrain surrounding the settler unit in the center of the screen. Rather, the terrain is being set to black since the GL context draws last.

civ3_osmesa

Edited Jul 20, 2021 by Bryan Varner
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking