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

Add runtime SPIR-V validation #2460

Merged
merged 25 commits into from
Mar 3, 2024
Merged

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Feb 1, 2024

Changelog:

### Additions
- Validation between shader code and device extensions, features and properties.

This adds validation for the VUIDs in the RuntimeSpirv section of the spec. Those VUIDs don't belong to any particular command, but in practice most of them apply during shader/pipeline creation. Not all of them could be validated, as some rely on knowing the inputs of particular commands; safety rules were added to the shader module for those instead.

Rua and others added 6 commits February 1, 2024 17:12
* Up vk version in shader compilation

* Update test in codegen.rs

* cargo +nightly fmt

* Update lib.rs

* clippy + fmt fixes

* simplify changes

* post merge
@maratik123
Copy link
Contributor

maratik123 commented Feb 15, 2024

Is it Ok, that such amount of code was added without any unit-testing validation?

hakolao and others added 19 commits February 20, 2024 13:23
…lkano-rs#2473)

* Make image_index and final_views accessible, and new example.

The first 2 changes should make creating frame buffers easier.
The new example should make it easier to learn vulkano-util.

* Remove unnecessary imports, and run clippy.

* Run fmt.

* .acquire() no longer returns image_index

* rename final_views() to swapchain_image_views()

The name change makes it more consistent with swapchain_image_view().

Personally I don't understand why the field name is final_views, yet we externally in function names refer to it as swapchain image views and such like.

* Fractal example no longer creates framebuffer every frame.

* Game of life example no longer creates framebuffer every frame.

(Also removed a piece of code I had commented out, but had forgotten to remove from the fractal example.)

* Rename if_recreate_swapchain to on_recreate_swapchain and update acquire() documentation. to on_recreate_swapchain

* on_recreate_swapchain is now impl FnOnce instead of generics based FnMut

Thanks marc0246!

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

* Replace empty comment with an actual comment.

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
I have only noticed this as I was writing the changelog.

@coolcatcoder for future reference, `&Vec<T>` is an anti-pattern. There's nothing more you can do with it than with `&[T]` (because the reference is immutable) and it means that we can't use a different underlying buffer without a breaking change.
* Replace cgmath with glam in the examples

* Implement type_for_format! for glam

* Remove comment where I'm freaking out because of OpenGL flashbacks

* Update Cargo.toml

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

* Update vulkano/autogen/formats.rs

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

* Fix glam type_for_format

* Format the code

---------

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

@AustinJ235 AustinJ235 left a comment

Choose a reason for hiding this comment

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

👍

@AustinJ235 AustinJ235 merged commit 4666a9c into vulkano-rs:master Mar 3, 2024
5 checks passed
AustinJ235 added a commit that referenced this pull request Mar 3, 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.

8 participants