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

Document Naga's promises around validation and panics. #1828

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

jimblandy
Copy link
Member

No description provided.

Copy link
Collaborator

@JCapucho JCapucho left a comment

Choose a reason for hiding this comment

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

Not sure if this is the best spot to put them but the contents seems about right to me

@jimblandy jimblandy merged commit ba58ef5 into gfx-rs:master Apr 14, 2022
@jimblandy jimblandy deleted the document-validate-rules branch April 14, 2022 23:21
@jimblandy
Copy link
Member Author

Not sure if this is the best spot to put them but the contents seems about right to me

Yeah, it's a good point. Would Validator::new be better? Or the valid module documentation?

@JCapucho
Copy link
Collaborator

Not sure if this is the best spot to put them but the contents seems about right to me

Yeah, it's a good point. Would Validator::new be better? Or the valid module documentation?

I think that in terms of api discoverability this would make more sense in the back module documentation since this refers to the operation of the backends, like have this part

// If you do not perform full validation, invalid shaders may
/// cause Naga to panic. If you do perform full validation and
/// [`Validator::validate`] returns `Ok`, then Naga promises that
/// code generation will either succeed or return an error; it
/// should never panic.

In the back module and the rest where it's (and maybe add a link to the back documentation)

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