Commit d6b532ce authored by Jiawei Shao's avatar Jiawei Shao Committed by Commit Bot

WebGPU: Report more details about buffer map async status

This patch replaces the "unknown" buffer map async status with
two more detailed ones (destroyed_before_callback and
ummapped_before_callback) to provide more information about
these abnormal buffer may async statuses.

BUG=dawn:533

Change-Id: I17480eb87b7af5ef131e37843ad37097ad4f5026
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434110
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: default avatarCorentin Wallez <cwallez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811640}
parent 31f17812
......@@ -291,6 +291,16 @@ void GPUBuffer::OnMapAsyncCallback(ScriptPromiseResolver* resolver,
resolver->Reject(MakeGarbageCollected<DOMException>(
DOMExceptionCode::kOperationError, "Device is lost"));
break;
case WGPUBufferMapAsyncStatus_DestroyedBeforeCallback:
resolver->Reject(MakeGarbageCollected<DOMException>(
DOMExceptionCode::kOperationError,
"Buffer is destroyed before the mapping is resolved"));
break;
case WGPUBufferMapAsyncStatus_UnmappedBeforeCallback:
resolver->Reject(MakeGarbageCollected<DOMException>(
DOMExceptionCode::kOperationError,
"Buffer is unmapped before the mapping is resolved"));
break;
default:
NOTREACHED();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment