xserver/glamor
Dor Askayo 94dad4f051 xwayland: clear pixmaps after creation in rootless mode
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.

Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/636
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
(cherry picked from commit 0e9a0c203c)

[ Michel Dänzer:
* Squashed in commit ebf549db2d
* Dropped code related to glamor_format, which only exists on master ]
2020-02-21 23:21:33 +00:00
..
Makefile.am glamor: Implement PixmapFromBuffers and BuffersFromPixmap 2018-03-05 13:27:49 -05:00
glamor.c xwayland: clear pixmaps after creation in rootless mode 2020-02-21 23:21:33 +00:00
glamor.h xwayland: clear pixmaps after creation in rootless mode 2020-02-21 23:21:33 +00:00
glamor_addtraps.c
glamor_composite_glyphs.c
glamor_compositerects.c
glamor_context.h
glamor_copy.c glamor: Propagate glamor_prepare_access failures in copy helpers 2020-02-10 10:20:30 +01:00
glamor_core.c glamor: Stop tracking the screen_fbo. 2017-06-02 17:46:45 -07:00
glamor_dash.c
glamor_debug.h glamor: Remove the "delayed fallback" code. 2017-06-02 17:46:48 -07:00
glamor_egl.c glamor: Add a function to get the driver name via EGL_MESA_query_driver 2019-11-26 21:57:17 -08:00
glamor_egl.h glamor/xwayland: Define EGL_NO_X11 2019-11-05 08:12:03 -08:00
glamor_egl_ext.h glamor: Implement PixmapFromBuffers and BuffersFromPixmap 2018-03-05 13:27:49 -05:00
glamor_egl_stubs.c glamor: Unbreak glamor_fd_from_pixmap() 2018-08-01 11:01:37 -04:00
glamor_eglmodule.c glamor: Bump version to 1.0.1 to signal depth 30 support. 2018-02-27 10:18:07 -05:00
glamor_fbo.c xwayland: clear pixmaps after creation in rootless mode 2020-02-21 23:21:33 +00:00
glamor_font.c
glamor_font.h
glamor_glx.c
glamor_glyphblt.c
glamor_gradient.c glamor: fix leak of fs_getcolor_source. 2018-10-04 17:26:15 +02:00
glamor_image.c glamor: Avoid software fallback for planemasked ZPixmap GetImage 2017-03-20 13:48:40 -04:00
glamor_largepixmap.c glamor: Avoid overflow between box32 and box16 box 2017-09-13 11:02:52 -04:00
glamor_lines.c
glamor_picture.c glamor: Propagate FBO allocation failure for picture to texture upload 2020-02-10 10:19:18 +01:00
glamor_pixmap.c
glamor_points.c
glamor_prepare.c glamor: Fix a compiler warning since the recent OOM fixes. 2020-02-10 10:22:34 +01:00
glamor_prepare.h
glamor_priv.h xwayland: clear pixmaps after creation in rootless mode 2020-02-21 23:21:33 +00:00
glamor_program.c render: Store and use all 16bpc of precision for solid pixels (v2.1) 2018-02-26 16:46:34 -05:00
glamor_program.h
glamor_rects.c glamor: Scissor rectangle drawing to the bounds of the rects. 2017-08-14 12:35:55 -07:00
glamor_render.c glamor: Check that storage format is compatible with RENDER format 2019-02-20 14:24:28 -05:00
glamor_segs.c
glamor_spans.c
glamor_sync.c
glamor_text.c
glamor_transfer.c glamor: Add 30bit RGB color format support 2018-01-25 12:21:49 -05:00
glamor_transfer.h
glamor_transform.c
glamor_transform.h
glamor_trapezoid.c
glamor_triangles.c
glamor_utils.c
glamor_utils.h render: Store and use all 16bpc of precision for solid pixels (v2.1) 2018-02-26 16:46:34 -05:00
glamor_vbo.c glamor: Drop the non-VAO rendering path 2017-11-15 09:53:50 -05:00
glamor_window.c
glamor_xv.c glamor: fix glamor_xv_query_image_attributes() for odd-width images 2018-04-17 17:30:16 -04:00
meson.build glamor: Implement GetSupportedModifiers 2018-03-05 13:27:55 -05:00