-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(webgpu): external webgpu surfaces / byow #21835
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, though would like someone with more FFI knowledge than me to take a look as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From an FFI point of view there isn't much to say here: "Pointers are bad mmkay" about sums it up but that's not really very useful :)
I had some questions but nothing really major. This is a very interesting feature in either case and I'm all for taking advantage of the opportunities that FFI provides.
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
@bartlomieju Should this be part of the 1.40 milestone? |
This PR contains the implementation of the External webgpu surfaces / BYOW proposal. BYOW stands for "Bring your own window".
Closes #21713
Adds
Deno.UnsafeWindowSurface
(--unstable-webgpu
API) to theDeno
namespace:For the initial pass, I've opted to support the three major windowing systems. The parameters correspond to the table below:
NSView*
HWND
HINSTANCE
Window
Display*
Ecosystem support:
Example
You can find more examples in the linked tracking issue.