Repository navigation
Conversation
…equests - Bump wgpu to the fork commit that sub-allocates small Queue::write_buffer uploads from reused staging chunks and records them as batched copies, instead of creating, mapping and copying from a new staging buffer per call. - Android: a featureLevel "compatibility" request now gets the hardware Vulkan adapter (GL only without it), and the adapter reports core with "core-features-and-limits" unless it is GL. Before, it went to the GL backend, which returned no adapter, so libraries that ask for compatibility (three.js WebGPURenderer) fell back to WebGL2.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Buffer uploads (wgpu fork bump,
e5c0aa02→399344e78)queue.writeBufferused to create, allocate and map a new staging buffer on every call, then record its own barrier and copy. The fork commit changes that:Larger writes, and the GL backend, keep the old path.
Adapter on Android (
crates/canvas-c/src/webgpu/gpu.rs)requestAdapter({ featureLevel: 'compatibility' })went straight to wgpu's GL backend, which finds no adapter, so it resolved tonull. three.jsWebGPURendereralways asks for compatibility, so it silently fell back to its WebGL2 backend.Now:
coreandcore-features-and-limits.Measurements
Galaxy S25 Ultra at 60 Hz, three.js r184
WebGPURenderer, a mixed-material scene of about 2,600 draws and 6,000writeBuffercalls per frame. Before and after are the same tree in the same session.render()writeBufferper frameAt about 5,200 draws, fps went from 10.9 to 19.3 and median
render()from 79.6 ms to 50.5 ms.Testing
webgpu.videospecs, which fail the same way before this change.passthroughfailures also fail on the previous rev. A newqueue_write_pooledtest writes thousands of mixed-size ranges across submissions and reads them back; it fails if the pool's offsets are broken.