Skip to content

Require use of the bitflag registry; improve bitflag docs#493

Merged
kainino0x merged 2 commits intowebgpu-native:mainfrom
kainino0x:bitflag-registry
Jan 17, 2025
Merged

Require use of the bitflag registry; improve bitflag docs#493
kainino0x merged 2 commits intowebgpu-native:mainfrom
kainino0x:bitflag-registry

Conversation

@kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Jan 11, 2025

Issue: #490
(dawn bug https://crbug.com/389099883)

* For reserved non-standard bitflag values, see @ref BitflagRegistry.
*/
typedef WGPUFlags WGPUBufferUsage;
/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit. These all seem really redundant, given that its documented in the code right below. Is it for doc generation that this is necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're right it's pretty redundant. Turns out the docs do show the definition:
image
unlike for enums:
image

Of course this html view is not the only possible way to look at things. But maybe the only useful docs are special cases like 0 and Red|Green|Blue|Alpha. Will follow up.

@kainino0x kainino0x enabled auto-merge (squash) January 17, 2025 06:26
@kainino0x kainino0x merged commit b4d0445 into webgpu-native:main Jan 17, 2025
5 checks passed
@kainino0x kainino0x deleted the bitflag-registry branch January 17, 2025 06:31
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.

2 participants