xserver-multidpi/glamor
Alex Goins b3ae038c32 glamor: Update pixmap's devKind when making it exportable
When making a pixmap exportable, glamor will currently create a temporary
exported pixmap backed by a GBM bo, with the devKind updated to the stride of
the bo. However, when the backing of the exported pixmap is swapped into the
original, the devKind of the original is not updated.

Some GBM bos may get implicitly padded, in which case the devKind of the pixmap
will not match the stride of the backing bo. For example, an 800x600 pixmap will
have a devKind of 3200, but the bo's stride will be 3328. This can cause
corruption with PRIME, when the sink uses the wrong stride to display the shared
pixmap.

This commit changes glamor_make_pixmap_exportable() to update the devKind of the
original pixmap after it swaps exported pixmap's backing into it, keeping
everything consistent.

Fixes issue #1018.

Signed-off-by: Alex Goins <agoins@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
(cherry picked from commit 7a7e55c5c1)
2020-11-04 11:33:21 -08: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: Remove _nf rendering functions 2015-03-24 12:01:39 -07:00
glamor_composite_glyphs.c glamor: Declare "pos" in the composite glyph GLSL 1.20 vertex shader 2016-08-23 12:59:55 +09:00
glamor_compositerects.c glamor: fix wrong offset on composite rectangles 2016-04-15 16:31:36 -04:00
glamor_context.h glamor: Replace glamor_get/put_context() with just glamor_make_current(). 2014-04-23 10:32:23 -07:00
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: Fix dashed line rendering. 2017-03-16 11:30:58 -07:00
glamor_debug.h glamor: Remove the "delayed fallback" code. 2017-06-02 17:46:48 -07:00
glamor_egl.c glamor: Update pixmap's devKind when making it exportable 2020-11-04 11:33:21 -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 dix: Switch to the libXfont2 API (v2) 2016-07-18 15:25:59 -04:00
glamor_font.h glamor: store old fonts in double width textures. 2016-01-13 11:21:02 +10:00
glamor_glx.c glamor: Do the same MakeCurrent(None) for GLX as we do for EGL. 2014-04-23 10:32:32 -07:00
glamor_glyphblt.c glamor: Check glamor_set_destination_drawable() return value 2017-03-15 15:41:13 -04:00
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: Check glamor_set_destination_drawable() return value 2017-03-15 15:41:13 -04:00
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: Move glamor_render.c pict handling to glamor_picture.c 2015-07-10 09:42:58 -07:00
glamor_points.c glamor: Check glamor_set_destination_drawable() return value 2017-03-15 15:41:13 -04:00
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: Replace fallback preparation code 2014-06-15 22:02:40 +01:00
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: Add support for CA rendering in a single pass. 2016-01-26 12:02:42 -08:00
glamor_rects.c glamor: Fix glamor_poly_fill_rect_gl xRectangle::width/height handling 2020-09-30 15:06:30 +00: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: Check glamor_set_destination_drawable() return value 2017-03-15 15:41:13 -04:00
glamor_spans.c glamor: Check glamor_set_destination_drawable() return value 2017-03-15 15:41:13 -04:00
glamor_sync.c glamor: Make glamor_sync_init work with --disable-xshmfence 2016-09-25 11:00:24 -07:00
glamor_text.c glamor: Translate solid text background region after clipping 2016-07-15 12:59:43 -04:00
glamor_transfer.c glamor: Add 30bit RGB color format support 2018-01-25 12:21:49 -05:00
glamor_transfer.h glamor: Add simple upload/download functions in glamor_transfer 2014-04-03 13:07:51 -07:00
glamor_transform.c glamor: glamor_set_destination_drawable() can fail 2017-03-15 15:41:12 -04:00
glamor_transform.h glamor: glamor_set_destination_drawable() can fail 2017-03-15 15:41:12 -04:00
glamor_trapezoid.c glamor: Remove _nf rendering functions 2015-03-24 12:01:39 -07:00
glamor_triangles.c glamor: Remove _nf rendering functions 2015-03-24 12:01:39 -07:00
glamor_utils.c Convert glamor & glx to new *allocarray functions 2015-04-21 16:58:08 -07:00
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: Drop tracking of the last picture attached to pixmaps. 2015-07-10 09:42:58 -07:00
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