Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
xserver
xserver
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 892
    • Issues 892
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 86
    • Merge Requests 86
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • xorg
  • xserverxserver
  • Merge Requests
  • !307

Merged
Opened Oct 12, 2019 by Dor Askayo@doraskayoContributor

xwayland: clear pixmaps after creation in rootless mode

  • Overview 14
  • Commits 1
  • Pipelines 7
  • Changes 5

Description

From the commit message:

When a pixmap is created with a backing FBO, the FBO should be cleared
to avoid rendering uninitialized memory. This could happen when the
pixmap is rendered without being filled in its entirety.

One example is when a top-level window without a background is
resized. The pixmap would be reallocated to prepare for more pixels,
but uninitialized memory would be rendered in the resize offset until
the client sends a frame that fills these additional pixels.

Another example is when a new top-level window is created without a
background. Uninitialized memory would be rendered after the pixmap is
allocated and before the client sends its first frame.

This issue is only apparent in OpenGL implementations that don't zero
the VRAM of allocated buffers by default, such as RadeonSI.

The issue

Notice the artifacts shown at the bottom and right parts of the window as it's being resized: without-patch

Proposed solution

With this MR applied, textures are now cleared after creation and before being rendered, and therefore appear black in area where nothing has been drawn at the moment of rendering: with-patch

Tests performed

This change was tested in the following scenarios:

  • Xwayland in gnome-shell with RadeonSI
  • Xwayland in gnome-shell with LLVMpipe
  • Xwayland in weston with RadeonSI
  • Xorg in gnome-shell with modesetting and RadeonSI (for reference)

How to reproduce

The issue of uninitialized memory being rendered on resize is easily reproducible with Chromium and the Steam client, simply resize their windows fast. The issue of uninitialized memory being rendered for new windows is easily reproducible in Dota Underlords and sometimes Chromium. As far as I know, this can only be reproduced with RadeonSI since it doesn't zero the VRAM of allocated buffers.

Relevant issues

Fixes #636 (closed)

Edited Oct 30, 2019 by Dor Askayo
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: xorg/xserver!307
Source branch: clear_pixmap