xwayland/window-buffers: Set syncpnts for all pixmaps
The wp_linux_drm_syncobj_v1 protocol states that :
| If at surface commit time there is a pending buffer attached but no
| pending release timeline point set, the no_release_point protocol
| error is raised.
So we need to set a release timeline point in any case from the swap
pixmap routine, even for the early out code paths.
Failing to do so may cause a Wayland protocol error that is fatal to the
Wayland client, in this case Xwayland:
| wp_linux_drm_syncobj_surface_v1: error 4: No Acquire point provided
| (EE) failed to dispatch Wayland events: Protocol error
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1688
Fixes: 87bf2cafcc - xwayland: add support for wp_linux_drm_syncobj_v1
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1571>
			
			
This commit is contained in:
		
							parent
							
								
									33330f0dc9
								
							
						
					
					
						commit
						bc9bf56360
					
				|  | @ -414,6 +414,8 @@ xwl_window_swap_pixmap(struct xwl_window *xwl_window, Bool handle_sync) | |||
|         if (xwl_is_client_pixmap(window_pixmap)) { | ||||
|             xwl_window_buffer->pixmap = NULL; | ||||
|             xwl_window_buffer_maybe_dispose(xwl_window_buffer); | ||||
|             if (handle_sync) | ||||
|                 xwl_window_handle_pixmap_sync(xwl_window, window_pixmap, NULL); | ||||
|             return window_pixmap; | ||||
|         } | ||||
|     } else { | ||||
|  | @ -424,8 +426,11 @@ xwl_window_swap_pixmap(struct xwl_window *xwl_window, Bool handle_sync) | |||
|         window_pixmap->refcnt++; | ||||
|         xwl_window_realloc_pixmap(xwl_window); | ||||
| 
 | ||||
|         if (!xwl_window_buffer) | ||||
|         if (!xwl_window_buffer) { | ||||
|             if (handle_sync) | ||||
|                 xwl_window_handle_pixmap_sync(xwl_window, window_pixmap, NULL); | ||||
|             return window_pixmap; | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     xwl_window_buffer->pixmap = window_pixmap; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue