Skip to content

Simplify WGPUWaitStatus "Unsupported" cases#499

Merged
kainino0x merged 4 commits intowebgpu-native:mainfrom
kainino0x:waitstatus-error
Jan 25, 2025
Merged

Simplify WGPUWaitStatus "Unsupported" cases#499
kainino0x merged 4 commits intowebgpu-native:mainfrom
kainino0x:waitstatus-error

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.

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