skia2/experimental/webgpu-bazel
Arman Uguray cc046f3cb3 [ganesh][dawn] Fix mapAsync range size invocation
Due to a bug in the WebGPU emscripten bindings, the Dawn backend was
only mapping 0-size region of a GPU buffer when invoking
wgpu::Buffer::MapAsync. To map the entire buffer, we now call it with
wgpu::kWholeMapSize.

Note that due to the same Emscripten bug, wgpu::Buffer::GetMappedRange
must be invoked with "size = 0" to obtaine the entire mapped range. This
inconsistency was the root cause for the mapping failures described in
skia:13266.

Also removed the workaround in the webgpu-bazel demo and made the demo
default to rendering a runtime effect because it's cooler.

Bug: skia:13266
Change-Id: Ia42fd33a4c897a99d37f0a43b065c1dd2f45ec22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/534944
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-05-02 18:41:47 +00:00
..
example [ganesh][dawn] Fix mapAsync range size invocation 2022-05-02 18:41:47 +00:00
src [ganesh][dawn] Fix mapAsync range size invocation 2022-05-02 18:41:47 +00:00
.gitignore [experimental] Add WebGPU demo (built with Bazel) 2021-10-12 18:34:55 +00:00
Makefile [experimental] Update WebGPU/Bazel demo 2022-04-29 21:07:31 +00:00