Repository navigation
Support passing MapMode as (potentially invalid) bitflags and pass all mapping tests in deno - #10398
Merged
Merged
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
sagudev
force-pushed
the
bma
branch
3 times, most recently
from
September 20, 2026 15:18
d053a1f to
2cf1596
Compare
sagudev
force-pushed
the
bma
branch
2 times, most recently
from
September 28, 2026 17:49
95099bc to
2f36193
Compare
sagudev
force-pushed
the
bma
branch
7 times, most recently
from
October 25, 2026 07:03
04c5311 to
60f5694
Compare
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
this is important as we need to return Abort error instead of Operation error which is raised on invalid buffer Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
sagudev
marked this pull request as ready for review
October 25, 2026 07:27
Member
|
@Mergifyio queue |
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connections
Towards #10073
spec issue: gpuweb/cts#4708
spec change: gpuweb/gpuweb#10971
CTS change: gpuweb/cts#4713
Description
Similarly as in #10315 we need to pass
GPUMapModeFlagsas bitflags, so we can do move validation from content process in GPU processes. Ordering of validation checks is important here (https://gpuweb.github.io/gpuweb/#dom-gpubuffer-mapasync):To make it easier to code in downstream consumers which use MapModeFlags we also return resolved MapMode into the callback (instead of returning
()).Many deno commits is made to make all
webgpu:api,validation,buffer,mapping:*tests work. The main thing is that we need to limit scope of OpState refcell borrows to prevent crashes, and drain microtask queue before resolving promise (to get deferred promise behavior). I did try to follow spec to the letter by returning promise object and resolving it from callback in sagudev@1dcc79c, but tokio tasks are not part of deno's event loop so event loop might complete before promise resolves thus no tests are actually done before we are done executing event loop.Testing
New deno test enabled, and
webgpu:api,validation,buffer,mapping:mapAsync,destroyedDevice:*also passes.Squash or Rebase?
Rebase
LLM Use?
None
Checklist
CHANGELOG.mdentries for the user-facing effects of this change are present.wgpumay be affected behaviorally.