wlroots/types
Simon Ser c2bd63c186 output: detach buffer from renderer before commit
Right now we rely entirely on implicit sync for synchronizing
access to GPU buffers. Implicit sync works by setting
synchronization points on the buffer in writers, and letting
readers wait on these sync points before accessing the buffer.

With OpenGL, sync points are created using functions such as
eglSwapBuffers or glFlush. If none of these special functions
are called, no sync point will be created and readers will
potentially access a buffer that hasn't finished rendering yet.

In the context of wlroots, OpenGL is the writer and the backend
(KMS or parent Wayland/X11 session) is the reader. After we're
done rendering a frame, and before passing that frame to the
backend, we need to call glFlush.

glFlush is called when the buffer is detached from the renderer.
This is a task done by output_clear_back_buffer. So let's call
this function before invoking the impl->commit hook, instead of
calling it after.

All of this is maybe a little tricky to get right with the
current renderer_bind_buffer API. The new
wlr_renderer_begin_with_buffer API is much better, because glFlush
is called on wlr_renderer_end, so it's more intuitive.

Closes: https://github.com/swaywm/wlroots/issues/3020
2021-07-07 12:00:43 -04:00
..
data_device wlr_drag: Destroy drag after releasing grabs 2020-06-30 11:11:52 +02:00
seat gtk-primary-selection: drop support 2021-04-08 09:50:18 +02:00
tablet_v2 tablet-v2: fix pad and tool object versions 2021-07-01 10:52:58 -04:00
xdg_shell move wlr_box from /types to /util 2021-07-06 21:43:17 +02:00
meson.build move wlr_box from /types to /util 2021-07-06 21:43:17 +02:00
wlr_buffer.c buffer: unify texture creation in wlr_client_buffer_import 2021-07-05 11:13:41 -04:00
wlr_compositor.c surface: make wlr_subsurface_create private 2021-06-29 10:32:17 -04:00
wlr_cursor.c move wlr_box from /types to /util 2021-07-06 21:43:17 +02:00
wlr_data_control_v1.c Simplify globals implementation by removing destructors 2019-11-25 09:01:46 -05:00
wlr_drm.c drm: add support for DMA-BUFs 2021-07-05 11:13:41 -04:00
wlr_export_dmabuf_v1.c export-dmabuf: export DMA-BUF on output commit 2020-11-05 09:43:42 +01:00
wlr_foreign_toplevel_management_v1.c toplevel-management: avoid redundant state events 2021-01-05 12:22:20 +01:00
wlr_fullscreen_shell_v1.c Simplify globals implementation by removing destructors 2019-11-25 09:01:46 -05:00
wlr_gamma_control_v1.c gamma-control-v1: schedule frame when resetting gamma LUT 2021-01-10 18:40:08 +01:00
wlr_idle.c Simplify globals implementation by removing destructors 2019-11-25 09:01:46 -05:00
wlr_idle_inhibit_v1.c idle-inhibit: Style and naming improvements 2020-02-20 21:40:34 +01:00
wlr_input_device.c Remove all wayland-server.h includes 2019-07-27 15:49:32 -04:00
wlr_input_inhibitor.c Make implementation function lists static const 2021-02-05 10:04:20 +01:00
wlr_input_method_v2.c input-method: send modifiers in set_keyboard 2020-11-06 19:14:55 +01:00
wlr_keyboard.c Replace wlr_key_state with wl_keyboard_key_state 2020-11-11 10:58:38 +01:00
wlr_keyboard_group.c Replace wlr_key_state with wl_keyboard_key_state 2020-11-11 10:58:38 +01:00
wlr_keyboard_shortcuts_inhibit_v1.c keyboard-shortcuts-inhibit: Implement the protocol 2020-02-20 21:40:34 +01:00
wlr_layer_shell_v1.c layer-shell: allow new values for keyboard-interactivity 2021-01-12 20:13:52 +01:00
wlr_linux_dmabuf_v1.c linux-dmabuf-v1: implement wlr_buffer 2021-05-17 16:22:43 +02:00
wlr_matrix.c move wlr_box from /types to /util 2021-07-06 21:43:17 +02:00
wlr_output.c output: detach buffer from renderer before commit 2021-07-07 12:00:43 -04:00
wlr_output_damage.c move wlr_box from /types to /util 2021-07-06 21:43:17 +02:00
wlr_output_layout.c move wlr_box from /types to /util 2021-07-06 21:43:17 +02:00
wlr_output_management_v1.c output-management: use same types as wlr_output 2021-01-10 16:28:19 +01:00
wlr_output_power_management_v1.c output-power-management-v1: listen to output commit 2020-08-27 13:54:19 -06:00
wlr_pointer.c Remove all wayland-server.h includes 2019-07-27 15:49:32 -04:00
wlr_pointer_constraints_v1.c move wlr_box from /types to /util 2021-07-06 21:43:17 +02:00
wlr_pointer_gestures_v1.c Simplify globals implementation by removing destructors 2019-11-25 09:01:46 -05:00
wlr_presentation_time.c Simplify globals implementation by removing destructors 2019-11-25 09:01:46 -05:00
wlr_primary_selection.c wlr_seat: Fix edge cases with serial validation 2019-06-30 15:01:05 -04:00
wlr_primary_selection_v1.c primary selection: destroy devices before manager 2021-01-05 13:53:58 +01:00
wlr_region.c region: stabilize interface 2021-07-05 09:25:25 -04:00
wlr_relative_pointer_v1.c Simplify globals implementation by removing destructors 2019-11-25 09:01:46 -05:00
wlr_screencopy_v1.c move wlr_box from /types to /util 2021-07-06 21:43:17 +02:00
wlr_server_decoration.c Simplify globals implementation by removing destructors 2019-11-25 09:01:46 -05:00
wlr_surface.c buffer: stop sending wl_buffer.release events from wlr_client_buffer 2021-07-05 11:13:41 -04:00
wlr_switch.c Remove all wayland-server.h includes 2019-07-27 15:49:32 -04:00
wlr_tablet_pad.c tablet: stop using wlr_list 2021-07-01 10:35:39 -04:00
wlr_tablet_tool.c tablet: stop using wlr_list 2021-07-01 10:35:39 -04:00
wlr_text_input_v3.c text_input_v3: correct typo in enum field 2021-02-15 16:33:05 +01:00
wlr_touch.c Remove all wayland-server.h includes 2019-07-27 15:49:32 -04:00
wlr_viewporter.c viewporter: new protocol implementation 2020-06-17 09:10:54 -06:00
wlr_virtual_keyboard_v1.c virtual_keyboard: Emulate key release events on destroy 2021-05-07 11:18:19 +02:00
wlr_virtual_pointer_v1.c Fix incorrect format parameters 2020-07-27 10:49:19 +02:00
wlr_xcursor_manager.c Make wlr_xcursor_manager_load() return a bool 2020-05-18 16:48:44 +02:00
wlr_xdg_activation_v1.c xdg-activation-v1: fix wlr_xdg_activation_v1_create error path 2021-06-17 14:48:28 +02:00
wlr_xdg_decoration_v1.c xdg-decoration: free old configure structs 2020-06-25 10:33:58 +02:00
wlr_xdg_foreign_registry.c util/uuid: replace with util/token, remove libuuid 2021-04-11 19:09:36 +02:00
wlr_xdg_foreign_v1.c xdg-foreign: rename finish_* functions to destroy_* 2021-02-08 18:09:00 +01:00
wlr_xdg_foreign_v2.c xdg-foreign: rename finish_* functions to destroy_* 2021-02-08 18:09:00 +01:00
wlr_xdg_output_v1.c xdg-output: destroy outputs before manager 2021-01-19 11:56:31 +01:00