Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

[WIP] Headless export-dmabuf #2268

Closed
wants to merge 2 commits into from
Closed

Conversation

any1
Copy link
Contributor

@any1 any1 commented Jun 8, 2020

This is very much work in progress, but it does work quite well.

Things I'd like some feedback on:

  • GBM buffer allocation. Would it be better to get the render node from DRM if the renderer belongs to DRM?
  • The way I added glEGLImageTargetRenderbufferStorageOES into the backend is rather ugly. Suggestions?

Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

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

I haven't looked into this in detail, but here are some general comments.

Something quite similar has been worked on for the DRM backend. I think ti would make sense to use the renderer v6's wlr_swapchain here too. See #2240

GBM buffer allocation. Would it be better to get the render node from DRM if the renderer belongs to DRM?

It may make sense to add wlr_renderer_get_fd. See #1376 (comment)

@@ -164,6 +164,14 @@ bool wlr_renderer_blit_dmabuf(struct wlr_renderer *r,
return r->impl->blit_dmabuf(r, dst, src);
}

GLuint wlr_renderer_renderbuffer_from_image(struct wlr_renderer *r,
Copy link
Member

Choose a reason for hiding this comment

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

This leaks EGL/GL implementation details into the generic renderer interface.

render/egl.c Outdated
@@ -419,6 +419,9 @@ void wlr_egl_save_context(struct wlr_egl_context *context) {
}

bool wlr_egl_restore_context(struct wlr_egl_context *context) {
if (!context->display)
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't correctly restore EGL_NO_DISPLAY.

@emersion emersion marked this pull request as draft June 9, 2020 09:50
@any1 any1 mentioned this pull request Jun 9, 2020
9 tasks
@emersion
Copy link
Member

GBM buffer allocation. Would it be better to get the render node from DRM if the renderer belongs to DRM?

#1376 now has wlr_renderer_get_drm_fd.

@emersion
Copy link
Member

I've adapted #2240 for the headless backend: #2374

@any1 any1 closed this Aug 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants