wgpu
wgpu copied to clipboard
buffer_get_mapped_range different way of passing range than buffer_map_async
Is your feature request related to a problem? Please describe.
buffer_get_mapped_range has offset and size while buffer_map_async uses rust's range.
Describe the solution you'd like
To make things more concise and more up to specs buffer_map_async should have offset and size like in spec: https://gpuweb.github.io/gpuweb/#dom-gpubuffer-mapasync
Describe alternatives you've considered
Alternative would be to switch buffer_get_mapped_range to use range.
Additional context This is all in wgpu-core, the goal is to have only one way of describing ranges.
I would personally prefer they both just use Range
Is this not already implemented? buffer_get_mapped_range in the core wrapper already uses range instead of the offset
Is this not already implemented?
Not on wgpu-core (latest on crates): https://docs.rs/wgpu-core/latest/wgpu_core/global/struct.Global.html#method.buffer_get_mapped_range also not on trunk: https://github.com/gfx-rs/wgpu/blob/trunk/wgpu-core/src/device/global.rs#L2462