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

ValidationError-ify ShaderModule #2268

Merged
merged 6 commits into from
Jul 24, 2023

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Jul 24, 2023

Changelog:

### Additions
- `ShaderModule` is now constructed with a `new` method, which takes a `ShaderModuleCreateInfo` struct. The old constructors `from_words` and `from_bytes` are deprecated.

Because having two different versions of ShaderModuleCreateInfo, one with bytes and one with words, would be difficult, I deprecated the old constructors. I also fixed an oversight in the runtime shader example: SPIR-V in byte form is always little-endian, so when reading the file you have to convert it.

Copy link
Contributor

@marc0246 marc0246 left a comment

Choose a reason for hiding this comment

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

Looks good, besides the nonstandard error message format.

vulkano/src/shader/mod.rs Outdated Show resolved Hide resolved
vulkano/src/shader/mod.rs Outdated Show resolved Hide resolved
Rua and others added 2 commits July 24, 2023 22:07
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
@Rua
Copy link
Contributor Author

Rua commented Jul 24, 2023

What error format do you mean?

@marc0246
Copy link
Contributor

marc0246 commented Jul 24, 2023

If you notice, rustc always outputs errors in lowercase and without trailing punctuation. This goes for errors, warnings, clippy warning, notes etc.

@marc0246 marc0246 merged commit 17dbd1a into vulkano-rs:master Jul 24, 2023
3 checks passed
marc0246 added a commit that referenced this pull request Jul 24, 2023
@Rua Rua deleted the shadermodule-validation branch October 25, 2023 14:24
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
* ValidationError-ify `ShaderModule`

* Typo

* Remove leftover comments

* slice, not Iterator

* Update vulkano/src/shader/mod.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

* Update vulkano/src/shader/mod.rs

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
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