-
Notifications
You must be signed in to change notification settings - Fork 280
Framebuffer API #174
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
Comments
I think having a method to access a memory-mapped frame buffer (not necessarily in GPU memory, can just be system memory) is a good idea -- it exists in all of (non-exhaustive list) Win32, X11, Wayland, KMS/DRM (Linux and BSDs), and nearly all embedded devices with a display and can be easily emulated on other systems. This allows for fast software rendering when desired, including on GPU-less devices. This is not a replacement for GPU APIs such as WebGL or WebGPU, which we should also support (except where there is no GPU, such as small embedded systems), but each method should get exclusive access to each Vulkan Surface (or equivalent) to avoid needing complex synchronization. |
Perhaps the baseline should be a compositor/animation API. You create a surface then animate it with its handle and a matrix (similar to CSS transform). Animating could be a capability right distinct from read/write. Maybe you could even generate a new handle where the read/write capabilities were constrained to a 2D region of the surface. Also any graphics API brings up the need for an accessibility API |
Hello! I was thinking about picking this up as a personal project in my free time 😄 @MarkMcCaskey and I gave a brief overview of a similar API Wasmer is currently working on at the December 19th, 2019 WASI Subgroup meeting. @sunfishcode brought up some good points that a standardized version of this API would not want to use a filesystem, as there may be some instances that there is no filesystem that the runtime is using. But instead, use memory and syscalls to store and draw individual pixels.
Definitely agreed here, I think we should definitely support this down the line, and should make sure this smaller / lower-level API is not perceived as an alternative for them 👍
This is a very good point, I did not consider this. We may want to add some accessibility hooks or something of the sort. But just so we are all on the same page. I was imagining this to be a set of syscalls that enabled a low level per pixel drawing. Similar to this articl, that explains this in the context of a linux framebuffer. 😄 If everyone here agrees this is a good starting point for the Framebuffer API, I'll go ahead and start looking for resources on how the proposal and stuff should be done. Thanks! |
Hello! So we discussed this again at the latest (I think?) WASI meeting on January 16th, 2020. Unfortunately, the meeting notes weren't posted, but I took these very vauge action items 😂
So I'm going to start tacking this tonight-ish 😄 I'll try and figure things out, and send you a pr @sunfishcode 👍 |
What kind of ideas or APIs have been developed so far for audio? |
@AldaronLau None that I know of so far 😄 But in general, it would be a good idea to make sure we don't block the availability of an audio buffer that a WASI host could support 😄 |
does it sound like a good idea to support vector frame buffers? |
Wasmer I/O Devices provide framebuffer API for WebAssembly, see announcement. Can't you standardize it looking at this implementation? |
We're now working on this at https://github.com/WebAssembly/wasi-webgpu/blob/main/wit/frame-buffer.wit |
What do you think of my comment in #171 (comment). Feasible? Not expert in the subject so I might not see lots of small details.
The text was updated successfully, but these errors were encountered: