gl4es icon indicating copy to clipboard operation
gl4es copied to clipboard

X11 WSI support for android targets?

Open twaik opened this issue 1 year ago • 8 comments

Hi. GL4ES can be used on Android devices but there is no X11 support. Can you please port mesa's X11 WSI code (this + this)? Or maybe mesa's vulkan X11 WSI code (this)? You can use AHardwareBuffer API for EGLImage and set it as framebuffer/renderbuffer and attach AHardwareBuffer's udmabuf fd to X server with simple xcb_shm_attach_fd call and then draw it with xcb_shm_put_image call.

Thank you.

twaik avatar Jul 14 '23 13:07 twaik

Interestingly, this would cause the framebuffer to be read by the AHardwareBuffer and sending it to x11, correct?

daviDarthemis avatar Sep 21 '23 23:09 daviDarthemis

Not exactly. It will cause rendering directly to AHardwareBuffer, which will be read by X server during rendering the root window.

twaik avatar Sep 22 '23 06:09 twaik

I hope the implementation is soon

daviDarthemis avatar Sep 22 '23 23:09 daviDarthemis

You can try opening another poll to try to get an answer

daviDarthemis avatar Sep 22 '23 23:09 daviDarthemis

@ptitSeb please add framebuffer and x11 support when using gl4es on termux or termux-x11 platforms in case of android definitions without NOX11

Mateus2022 avatar Aug 26 '24 16:08 Mateus2022

@ptitSeb please add framebuffer and x11 support when using gl4es on termux or termux-x11 platforms in case of android definitions without NOX11

And how do I do that? I mean, how do I create a context and all the stuffs needed to emulate X1 when NOX11 is used?

ptitSeb avatar Aug 26 '24 17:08 ptitSeb

You can create wrap all EGL calls and emulate X11 surface. Try to read this. https://github.com/tareksander/termux-gfx-wrapper/tree/main/src/egl

twaik avatar Aug 26 '24 17:08 twaik

@ptitSebadicione framebuffer e suporte x11 ao usar gl4es em plataformas termux ou termux-x11 no caso de definições android sem NOX11

E como eu faço isso? Quero dizer, como eu crio um contexto e todas as coisas necessárias para emular X1 quando NOX11 é usado?

I don't speak English, the shit on Google Translate fails, but I wish that when NOX11 is not used, x11 support would be enabled both in buffers too, there are many projects now that use x11+box64 in Mali gpus, this could be something good

Mateus2022 avatar Aug 26 '24 17:08 Mateus2022