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.