Skip to content

Update validity conditions of device & buffer on mapAsync - #10971

Open
sagudev wants to merge 1 commit into
gpuweb:mainfrom
sagudev:patch-4
Open

sagudev wants to merge 1 commit into
gpuweb:mainfrom
sagudev:patch-4

Conversation

@sagudev

@sagudev sagudev commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Per gpuweb/cts#4708 current wording of spec is wrong. This intention of #5114 was to raise AbortError (deviceLost=true) when device is invalid (lost) and raise OperationError on invalid buffer. Device check happens before buffer validity check.

This matches what dawn does:
https://github.com/google/dawn/blob/723d1f04c9d4bae31e67ca7a33589aeb0849efab/src/dawn/native/Buffer.cpp#L815-L817
I discovered the problem while working on wgpu (which powers Servo and Firefox), which currently does buffer validity then device validity check but maps both to OperationError.

Added CTS tests: gpuweb/cts#4713

@github-actions

Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (d1e3142):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant