Immediate Buffer.MapAsync() rejection if pending map in Wire

This immediate rejection has been implemented in Native but
hasn't been yet in Wire. This commit adds the implementation
to Wire.

Also the commit changes the MapAsync callback firing timing
if pending map buffer is unmapped or destroyed. With this
commit the callback will be fired immediately Unmap or
Destroy is called to match the WebGPU spec. Currently the
callback is fired when the client receives a response from
server but it mismatches the spec.

Change-Id: Ia48d62be31912fd0384e23271e9de516f9d71d6c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/113607
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Takahiro
2022-12-17 04:24:05 +00:00
committed by Dawn LUCI CQ
parent 0fcc00e22a
commit ad541a7cdd
4 changed files with 106 additions and 98 deletions

View File

@@ -465,6 +465,16 @@ crbug.com/dawn/1613 worker_webgpu:api,validation,buffer,mapping:getMappedRange,s
crbug.com/dawn/1613 worker_webgpu:api,validation,buffer,mapping:mapAsync,state,mappingPending:* [ Failure ]
################################################################################
################################################################################
# Buffer mapping tests need updates in CTS
################################################################################
webgpu:api,operation,buffers,map_oom:mapAsync:* [ Failure ]
webgpu:api,validation,buffer,mapping:getMappedRange,state,mapped:* [ Failure ]
webgpu:api,validation,buffer,mapping:getMappedRange,state,mappedAtCreation:* [ Failure ]
worker_webgpu:api,validation,buffer,mapping:getMappedRange,state,mapped:* [ Failure ]
worker_webgpu:api,validation,buffer,mapping:getMappedRange,state,mappedAtCreation:* [ Failure ]
################################################################################
################################################################################
# untriaged failures
# KEEP