mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 23:56:16 +00:00
Deprecation of using 0 as default size in buffer mapAsync
For size parameter in mapAsync, use wgpu::kWholeMapSize rather than 0 to indicate using the default size, i.e. remaining buffer size after offset. Using size=0 is still available but will cause a deprecation warning. Bug: dawn:1159 Change-Id: I474d87ecae4a54ceb28d636f883a6233c91f16fa Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66284 Auto-Submit: Zhaoming Jiang <zhaoming.jiang@intel.com> Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
180ec459ea
commit
2a5b981a87
@@ -166,7 +166,7 @@ namespace dawn_wire { namespace client {
|
||||
}
|
||||
|
||||
// Handle the defaulting of size required by WebGPU.
|
||||
if (size == 0 && offset < mSize) {
|
||||
if ((size == WGPU_WHOLE_MAP_SIZE) && (offset <= mSize)) {
|
||||
size = mSize - offset;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user