-
Notifications
You must be signed in to change notification settings - Fork 953
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
Remove IDs and Registries #5121
Comments
How exactly would that look like? Would that be something like hashmap that would map id to Arc of wgpu object that would live in WebGPU thread? I'm mostly asking for servo, as it would be nice to share ID mapping stuff. |
Yes, that's the general idea. Depending on how you generate the IDs you could get away with arrays instead of hash maps (like wgpu-core currently does). |
This is a meta issue to describe the long-ish term vision for wgpu-core's resource management and track the steps towards it.
Registries and IDs
Internally, all wgpu-core resources are stored behind
Arc
s. Externally, they are exposed as non-clonable structs containing an ID which conceptually corresponds to a single reference to theArc
of a resource.The goal
Instead of having wgpu public types wrap a non-clonabe ID, we would like them to wrap the
Arc
to the internal resource directly (and be clonable).TODO
wgpu-core
part of command recording out of the content processGlobal
's methods into methods on wgpu-core objectstrace
feature) towgpu
#5974The text was updated successfully, but these errors were encountered: