Merge branch 'pass' into 'master'

Draft: render: refactor render_pass

See merge request wlroots/wlroots!5292
This commit is contained in:
YaoBing Xiao 2026-04-10 14:02:23 +08:00
commit 9a60741a89
32 changed files with 1950 additions and 340 deletions

View file

@ -377,6 +377,7 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
wl_signal_init(&output->events.description);
wl_signal_init(&output->events.request_state);
wl_signal_init(&output->events.destroy);
wl_signal_init(&output->events.render_inited);
output->software_cursor_locks = env_parse_bool("WLR_NO_HARDWARE_CURSORS");
if (output->software_cursor_locks) {
@ -407,6 +408,7 @@ void wlr_output_finish(struct wlr_output *output) {
assert(wl_list_empty(&output->events.description.listener_list));
assert(wl_list_empty(&output->events.request_state.listener_list));
assert(wl_list_empty(&output->events.destroy.listener_list));
assert(wl_list_empty(&output->events.render_inited.listener_list));
wlr_output_destroy_global(output);

View file

@ -5,6 +5,7 @@
#include <wlr/render/allocator.h>
#include <wlr/render/interface.h>
#include <wlr/render/swapchain.h>
#include <wlr/render/interface.h>
#include <wlr/util/log.h>
#include <xf86drm.h>
#include "render/drm_format_set.h"
@ -35,6 +36,12 @@ bool wlr_output_init_render(struct wlr_output *output,
output->allocator = allocator;
output->renderer = renderer;
get_or_create_render_rect_pass(renderer);
get_or_create_render_texture_pass(renderer);
get_or_create_render_submit_pass(renderer);
wl_signal_emit_mutable(&output->events.render_inited, output);
return true;
}