-
Notifications
You must be signed in to change notification settings - Fork 546
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
Is there a way to access raw handles for components? #3698
Comments
There is no portable way to get the raw handles off gfx-rs objects, since there isn't always 1:1 mapping to anything under the API. Instead, each backend can expose its own raw APIs as needed. For example, Vulkan Instance could make the gfx/src/backend/vulkan/src/lib.rs Line 74 in 2ac006f
If you make a list of things you'd need exposed, we can make sure they are available. |
I'll have a look at what exactly needs to be made public and see if I can come up with a concrete list based on the different backends. I can do PRs to the individual backends to mark the items public if that's easier than dumping a list here and you can approve/reject depending on whether it aligns with the project. |
The PRs are definitely preferred and much appreciated. Thank you! |
I'm also interested in this. Personally I would use this to connect gfx-hal with OpenXR, OpenVR (driver API) and FFmpeg hardware acceleration API. Integrating these APIs directly into gfx-hal would not make much sense to me. |
3762: Low level interop with Vulkan backend r=kvark a=zarik5 Related issues: #3698 #3761 blaind/xrbevy#1 This PR exposes some Vulkan-backend-specific details needed for interop with other low level APIs. In particular this PR aims to implement a minimum viable API to allow OpenXR integration as a separate crate. This PR is nowhere complete. I opened it to get some feedback; this is my first PR on a project the size of gfx-hal. This is the first of multiple PRs needed for OpenXR support in wgpu. PR checklist: - [ ] `make` succeeds (on *nix) - [ ] `make reftests` succeeds - [ ] tested examples with the following backends: Vulkan EDIT: To make things clear, this is another take on #3761. Me and @blaind are working together on this route. Co-authored-by: zarik5 <riccardo.zaglia5@gmail.com>
3775: expose the underlying metal device r=kvark a=ccbrown This facilitates the ability to lock and utilize the underlying Metal device directly. My need is very similar to the one described in #3698, in which it was mentioned that functionality like this could be added to the individual backends and that PRs were appreciated. PR checklist: - [x] `make` succeeds (on *nix) - [x] `make reftests` succeeds - [x] tested examples with the following backends: Co-authored-by: Chris Brown <ccbrown112@gmail.com>
Short info header:
Is there way to expose the raw handle for things like the
Device
in order "shim" libraries into gfx-rs?For example the skulpin project using rafx, can get a raw handle to instance, device, etc.. to pass into skia-safe to bind to a skia
BackendContext
. You can see how skulpin does this here https://github.com/aclysma/skulpin/blob/master/skulpin-renderer/src/skia_support.rs#L48 with rafx.Is there a way to get a passable handle from gfx-rs to perform something similar in order to allow shimming of skia into the gfx-backend-* I've looked through the docs a fair bit and tried a few different things, but i'm coming up empty-handed to see how I could achieve this.
The text was updated successfully, but these errors were encountered: