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

Simplify WGPUWaitStatus "Unsupported" cases #499

Merged
merged 4 commits into from
Jan 25, 2025

Conversation

kainino0x
Copy link
Collaborator

Mentioned WGPUWaitStatus in #401 but I didn't think about simplifying it so we didn't discuss it.

Since we're relying now on "implementation-defined logging" to convey details we don't generally need detailed error codes for things that are just surface-level misuses of the API.

In WGPUWaitStatus we have three Unsupported cases:

  • WGPUWaitStatus_UnsupportedTimeout
  • WGPUWaitStatus_UnsupportedCount
  • WGPUWaitStatus_UnsupportedMixedSources

I don't think these are cases that a program would actually respond to programmatically. So I'm proposing we simplify into just one WGPUWaitStatus_Unsupported or WGPUWaitStatus_Error, with implementation-defined logging.

I used WGPUWaitStatus_Error here.

doc/articles/Asynchronous Operations.md Outdated Show resolved Hide resolved
webgpu.h Show resolved Hide resolved
Copy link
Collaborator

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this is fine, but I feel kinda bad removing information from the user

@kainino0x
Copy link
Collaborator Author

If users need this at runtime I think it's better if they just have a way to check the actual capabilities and not use trial-and-error. Filed #503 about reflecting the instance capabilities.

@kainino0x kainino0x merged commit 0c472a0 into webgpu-native:main Jan 25, 2025
5 checks passed
@kainino0x kainino0x deleted the waitstatus-error branch January 25, 2025 00:19
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.

3 participants