Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor
wgpu.utils
a bit.Before,
wgpu.utils
was not imported. When importing it, you'd get a few utils, but the shadertoy must be explicitly imported.This makes that more consistent: The
wgpu.utils
module is imported by default, but its submodules are not. They have to be explicitly imported. This may break some code that usewgpu.utils.compute_with_buffers
so I added a temporary stub function for it.Also added stubs for the submodules to make them easier to discover in an interactive session. They get replaced as soon as the import for the real module happens.
The only exception is
get_default_device()
. That function is generally useful, so its present by default.