Skip to content

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Oct 19, 2024

Sorry this is a lot of things in one PR, but I kept changing all of the docs to be consistent with each other, so this was easier.
(Can split if there are some parts that need more time to discuss.)

Fixes #255
Fixes #291 (again?)
IssueFixes #225
Fixes #64 (EDIT: and its duplicate #194)
EDIT: also fixes #115

webgpu.yml Outdated
- name: device_lost
doc: The @ref WGPUDevice configured on the @ref WGPUSurface was lost.
- name: error
doc: The surface is not configured, or there was a @ref StructChainingError.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe just point at the Surface.md article for a description of what might return an error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I kind of think struct chaining isn't really relevant to pile into the Surface.md article and prefer to just document it here.

webgpu.yml Outdated
doc: |
TODO
type: bool
Returns @ref WGPUStatus_Error (and leaves `limits` unchanged) if there was a @ref StructChainingError.
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about if the device/adapter itself is an error? IMHO the error cases should be defined in the algorithm steps of the articles, and not call out a particular kind of error.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is meant to mirror adapter.limits/device.limits in JS, where there is no possibility of the JS-wrapper object being an error.

I'm OK with moving this stuff into articles if we want to write those, but it's easier to start documenting things here and move them to articles if they get larger.

@kainino0x kainino0x added !discuss Needs discussion (at meeting or online) and removed !discuss Needs discussion (at meeting or online) labels Oct 28, 2024
@kainino0x
Copy link
Collaborator Author

Revised finally.

@kainino0x
Copy link
Collaborator Author

@Kangz re-review bump!

@kainino0x kainino0x enabled auto-merge (squash) November 8, 2024 20:45
@kainino0x kainino0x merged commit 80b1e3e into webgpu-native:main Nov 8, 2024
4 checks passed
@kainino0x kainino0x deleted the return-statuses branch November 8, 2024 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants