gpu: make Buffer.get*MappedRange a friendlier slice API

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-11 06:39:10 -07:00 committed by Stephen Gutekanst
parent 1848ac8ac7
commit 825a07ac2f
4 changed files with 34 additions and 12 deletions

View file

@ -152,6 +152,8 @@ Some WebGPU APIs expose slices as pointers and lengths, we either wrap these to
The slice helpers are:
* `Adapter.enumerateFeaturesOwned`
* `Buffer.getConstMappedRange`
* `Buffer.getMappedRange`
* `CommandEncoder.writeBuffer`
* `Queue.writeTexture`
* `Queue.writeBuffer`
@ -216,8 +218,6 @@ There may be other opportunities for helpers, to improve the existing APIs, or a
The following are definitive candidates for helpers we haven't implemented yet:
* `gpu.Buffer.getConstMappedRange` (slices)
* `gpu.Buffer.getMappedRange` (slices)
* `gpu.ComputePassEncoder.setBindGroup` (slice param)
* `gpu.Device.enumerateFeatures` (owned slice)
* `gpu.RenderBundleEncoder.setBindGroup` (slice param)