| commit | d28ff04c3e5f5e73159a86bc8d9712fe253261fd | [log] [tgz] |
|---|---|---|
| author | Tarun Saini <sainitarun@google.com> | Thu Oct 23 02:34:01 2025 -0700 |
| committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Oct 23 02:34:01 2025 -0700 |
| tree | 49656f506ea9e50a5ce76e9b5be173dd0c6cc6c6 | |
| parent | 604965a3e10631905cfb68560afba542765af0fe [diff] |
Fix: WGPUBuffer getMappedRange with WGPU_WHOLE_MAP_SIZE When calling `wgpuBufferGetMappedRange` with `WGPU_WHOLE_MAP_SIZE`, the size of the returned mapped range should be the size of the buffer minus the offset. This commit fixes the issue by: - Updating the generator to handle `WGPU_WHOLE_MAP_SIZE` for `WGPUBuffer` in `methods.cpp`. - Adding new tests in `BufferTest.kt` to verify the behavior of `getMappedRange` and `getConstMappedRange` with default and explicit offset/size values, including when `WGPU_WHOLE_MAP_SIZE` is used. Bug: b/450476328 Change-Id: I8c2f78474cde441ca3bcaf8185f134b1fb4425cb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/267134 Reviewed-by: Jim Blackler <jimblackler@google.com> Commit-Queue: Tarun Saini <sainitarun@google.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.