Replies: 1 comment
-
|
At the very least, it would be nice to have a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The docs for wgpu::Instance state:
This wording gives the impression that you can drop an Instance and create a new one elsewhere without side effects. However, that is not entirely correct in practice.
For example:
The last call panics with:
(from wgpu-core storage)
The reason is that Surfaces are tied to the Instance that created them. Internally, wgpu uses per-instance ID/epoch bookkeeping, so different instances cannot share surfaces.
Current docs do not make this restriction clear and might give the impression that instances are interchangeable.
PS: I'm opening this as a Q&A because I'm not sure if this counts as a bug (behavior is likely intended but the documentation could better explain this limitation)
Beta Was this translation helpful? Give feedback.
All reactions