Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swayfx compat changes #84

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/scenefx/render/fx_renderer/fx_renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ struct fx_renderer;
struct wlr_renderer *fx_renderer_create_with_drm_fd(int drm_fd);
struct wlr_renderer *fx_renderer_create(struct wlr_backend *backend);

struct fx_renderer *fx_get_renderer(
struct wlr_renderer *wlr_renderer);
struct fx_renderer *fx_get_renderer(struct wlr_renderer *wlr_renderer);

bool fx_renderer_check_ext(struct wlr_renderer *renderer, const char *ext);
GLuint fx_renderer_get_buffer_fbo(struct wlr_renderer *renderer, struct wlr_buffer *buffer);
Expand Down
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ pkgconfig.generate(
name: versioned_name,
version: meson.project_version(),
filebase: meson.project_name(),
name: meson.project_name(),
description: 'Wlroots effects library',
subdirs: versioned_name,
)
5 changes: 5 additions & 0 deletions types/scene/wlr_scene.c
Original file line number Diff line number Diff line change
Expand Up @@ -2421,6 +2421,11 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output,
timer->pre_render_duration = timespec_to_nsec(&duration);
}

// TODO: we need to revisit this, this is a stopgap to ensure we can resume swayfx rebase
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels wrong. We should sanity check this with scene upstream. How do they handle the case of output swapchain not being enabled here? Are we missing an initialization on the swayfx side?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was due to testing the new output modeset before applying if I'm not mistaken. So a new non-output swapchain is created and passed to scene. There's already a swapchain check in the output_build_state function so that should be good enough :)

if (!output->swapchain && !wlr_output_configure_primary_swapchain(output, state, &output->swapchain)) {
return false;
}

struct fx_gles_render_pass *render_pass =
fx_renderer_begin_buffer_pass(output->renderer, buffer, output,
&(struct wlr_buffer_pass_options) {
Expand Down