-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Remove IDs and Registries #5121
Copy link
Copy link
Closed
Labels
kind: refactorMaking existing function faster or nicerMaking existing function faster or nicertype: enhancementNew feature or requestNew feature or requesttype: trackingNot a bug or an enhancementNot a bug or an enhancement
Description
Activity
Metadata
Metadata
Assignees
Labels
kind: refactorMaking existing function faster or nicerMaking existing function faster or nicertype: enhancementNew feature or requestNew feature or requesttype: trackingNot a bug or an enhancementNot a bug or an enhancement
Type
Projects
- StatusShow more project fieldsDone
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
Arcs. Externally, they are exposed as non-clonable structs containing an ID which conceptually corresponds to a single reference to theArcof a resource.The goal
Instead of having wgpu public types wrap a non-clonabe ID, we would like them to wrap the
Arcto the internal resource directly (and be clonable).TODO
tracefeature) towgpu#5974ErrorSinkintowgpu-core#8911wgpu-corepart of command recording out of the content processGlobal's methods into methods on wgpu-core objectsserde_object_reference_structcan be removed (AL: when originally added, I had in mind to possibly simplify it/removemacro_rules_attributeafter we got rid of registries, althoughmacro_rules_attributeis now also used byConstDefault.)Other Related Issues
finish()#8234