Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Render to framebuffer #12332

Closed
1 task done
turbolent opened this issue May 27, 2024 · 4 comments
Closed
1 task done

Render to framebuffer #12332

turbolent opened this issue May 27, 2024 · 4 comments
Labels
feature [core label] gpui GPUI rendering framework support

Comments

@turbolent
Copy link

Check for existing issues

  • Completed

Describe the feature

What would it take to implement a renderer for Zed/gpui to render to non-accelerated target, like a basic framebuffer?

This would allow porting Zed to other platforms and older systems.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@Moshyfawn Moshyfawn added gpui GPUI rendering framework support and removed triage labels May 27, 2024
@jansol
Copy link
Contributor

jansol commented May 27, 2024

On Linux it is possible to use libdrm to render to the screen using Vulkan/EGL but without X11 or Wayland. You could use a software implementation of Vulkan to do this in order to get "non-accelerated" rendering. (of course it would be very slow though, so older systems won't gain much from that)

What platform/system did you have in mind, specifically? It may be possible to e.g. get it to work with blade's OpenGL ES 3.1 backend if Vulkan is not available.

@turbolent
Copy link
Author

Thanks for the pointer!

I'm mostly interested in non-accelerated targets or older systems which have accelerated graphics, but only support old standards (OpenGL <1.3, no modern OpenGL/OpenGL ES/Vulkan/etc).

In particular, it would be nice to be able to build Zed/gpui for WebAssembly, so it could be ported to e.g. browsers, but also through that to many other operating systems, architectures, and older hardware, by using https://github.com/turbolent/w2c2.

@jansol
Copy link
Contributor

jansol commented May 28, 2024

A web version of Zed is on the far-future roadmap AFAIK. That one will require a whole new "platform" in GPUI with a custom renderer implementation (based on WebGL? Canvas? DOM? idk).

If you really wanted to add a pure software renderer implementation for use on systems without any sort of graphics support that's certainly possible. On macOS it's possible to choose between the metal and blade renderers in GPUI at build time. You could use the same method to build GPUI with a CPU / legacy OpenGL renderer.

@dagbdagb
Copy link

dagbdagb commented Jun 3, 2024

One could possibly patch GLFW to work on top of glfbdev. If the latter even exists in upstream mesa. Fair bit of work for non-accelerated rendering.
Or zink on top of kms-vulkan. Equally theoretical, and would need plenty work.

@notpeter notpeter added linux and removed linux labels Jun 20, 2024
@fwcd fwcd mentioned this issue Jul 11, 2024
1 task
@zed-industries zed-industries locked and limited conversation to collaborators Feb 12, 2025
@probably-neb probably-neb converted this issue into discussion #24755 Feb 12, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
feature [core label] gpui GPUI rendering framework support
Projects
None yet
Development

No branches or pull requests

6 participants