Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue::on_submitted_work_done Does Not Obey WebGPU Ordering Contract #4024

Closed
cwfitzgerald opened this issue Aug 10, 2023 · 2 comments · Fixed by #4036
Closed

Queue::on_submitted_work_done Does Not Obey WebGPU Ordering Contract #4024

cwfitzgerald opened this issue Aug 10, 2023 · 2 comments · Fixed by #4036
Labels
type: bug Something isn't working

Comments

@cwfitzgerald
Copy link
Member

Description

The wgpu spec specifies the following about promise ordering:

For some GPUQueue q and GPUBuffer b on the same GPUDevice,
if p1 = b.mapAsync() is called before p2 = q.onSubmittedWorkDone(),
then p1 must settle before p2.

Repro steps

Submit a piece of work. Block until it is done. Call map_async on a buffer touched by that submit, then call on_submitted_work_done. The callback for on_submitted_work_done will immediately fire, despite the map_async callbacks not happening.

Other

Should be pretty easy to fix this, we just need to remove the optimistic immediate call of the callback. Will try to fix this tomorrow.

@cwfitzgerald cwfitzgerald added the type: bug Something isn't working label Aug 10, 2023
@teoxoy teoxoy added this to the WebGPU Specification V1 milestone Aug 10, 2023
@teoxoy
Copy link
Member

teoxoy commented Aug 10, 2023

Has been recently clarified in gpuweb/gpuweb#4117

@cwfitzgerald
Copy link
Member Author

It was always my understanding of what should happen, but that's when it was formalized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants