Skip to content
Discussion options

You must be logged in to vote

Preface: I only work on wgpu and not wgpu-native - this is based on a brief read of wgpu-native's rust side code and my knowledge of wgpu-core.

Each wgpu buffer is reference counted using Arcs, and each submission will clone this Arc (which, in effect, ups the reference count). These are droped (that is, their reference count will be decremented) on the device poll (queue submits implicitly poll) after the submission is complete. From reading wgpu-native's code, it appears to get the reference to that buffer by a buffer id (This may change, but external behavior will remain the same) and store this in a new Arc which is then exposed to you as a pointer. When all the references of this are…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@abocado18
Comment options

Answer selected by abocado18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants