Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KWin KWin
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 43
    • Issues 43
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 119
    • Merge requests 119
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Plasma
  • KWinKWin
  • Merge requests
  • !2358

platforms/drm: set read buffer in GbmSurface::makeContextCurrent

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Erik Kurzinger requested to merge ekurzinger/kwin:master into master May 08, 2022
  • Overview 7
  • Commits 1
  • Pipelines 3
  • Changes 1

The first time the GBM backend's EGL context is made current after creation, both the read and draw surfaces are set to EGL_NO_SURFACE. This will set the GL read and draw buffers to GL_NONE in accordance with the EGL spec.

When a real surface is later made current, however, the spec is arguably unclear on whether the read and draw buffers should remain set to GL_NONE or whether they should be restored to the default GL_BACK. The Mesa driver does the latter, the NVIDIA driver does the former.

To work around this difference, Kwin has an explicit call to glDrawBuffer in GbmSurface::makeContextCurrent. It does not have a corresponding call to glReadBuffer, though, which can cause some desktop effects such as background contrast to render incorrectly with the NVIDIA driver. This change adds that missing call.

Edited May 08, 2022 by Erik Kurzinger
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: master