commit | e5d94c31a052985075d0987dc852fa543007929e | [log] [tgz] |
---|---|---|
author | Jiawei Shao <jiawei.shao@intel.com> | Fri Jun 19 22:39:53 2020 +0000 |
committer | Commit Bot service account <commit-bot@chromium.org> | Fri Jun 19 22:39:53 2020 +0000 |
tree | b01f6ceba10921c09f1a7907581e5a672e2fd8d5 | |
parent | f434fdc6ed11c8d3e2a0c300612b4a1d4e2fc387 [diff] |
Fix a bug in ComputeTextureCopyBufferSize with empty copySize This patch fixes a bug in buffer-to-texture and texture-to-buffer copies when copySize.height == 0 or copySize.depth == 0. Previously we miss the checks if either copySize.height or copySize.depth is 0 before doing (copySize.height / blockHeight - 1) and (copySize.depth - 1) thus we will get incorrect results because of arithmetic overflows. This patch fixes this bug by adding the missed check and adds the related regression tests in dawn_unittests BUG=dawn:453 TEST=dawn_unittests Change-Id: I970e420c0fa7f0b61c656365bef079c123a59e6a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23520 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Dawn is an open-source and cross-platform implementation of the work-in-progress 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 webgpu.h docs)
(TODO)
Apache 2.0 Public License, please see LICENSE.
This is not an officially supported Google product.