Commit Graph

3810 Commits

Author SHA1 Message Date
marc0246
0a48a64802
#2480 changelog 2024-03-04 19:57:40 +01:00
stefnotch
b34dbe9e09
Nom nom (#2480)
* Replace formats.rs and features.rs regex with nom

* Fix missing eof in format rs

* Refactor parsing logic in extensions.rs

* Replace regex in mod.rs

* Replace regex in spriv_reqs.rs

* Improve nom usage for parsing get_header_version

* Remove stray dbg

* Remove final usage of regex

* Replace tag("single character") with char(...)

* Remove unused import

* Undo my testing changes to vk.xml
(I shouldn't have committed that)

* Sort cargo toml alphabetically

* Use nom for parse_depends

* Simplify parser again

* Parser cleanup

* Inline parser logic for shorter code

Thanks to marc for suggesting this

* Fix clippy violation

* Remove useless parse prefix
2024-03-04 19:53:07 +01:00
Rua
0375be7924
#2481 changelog 2024-03-04 17:25:17 +01:00
Rua
6a5aed496e
Rename Features, Properties to DeviceFeatures, DeviceProperties (#2481)
* Rename `Features`, `Properties` to `DeviceFeatures`, `DeviceProperties`

* Merge
2024-03-04 17:24:29 +01:00
Austin Johnson
aeb7a3ada5
#2460 Changelog 2024-03-03 16:30:41 -06:00
Rua
4666a9c722
Add runtime SPIR-V validation (#2460)
* Add runtime SPIR-V validation

* Remove copyright message

* fmt

* Up vk version in shader compilation (#2467)

* Up vk version in shader compilation

* Update test in codegen.rs

* cargo +nightly fmt

* Update lib.rs

* clippy + fmt fixes

* simplify changes

* post merge

* #2467 changelog

* Remove windows specific dnd disable (#2474)

* Fix unnecessarily strict validation for DRM format modifiers (#2469)

* #2469 changelog

* Add support for querying memory requirements directly from the device (#2470)

* #2470 changelog

* Make image_index and final_views accessible, and add new example. (#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>

* Fix `VulkanoWindowRenderer::swapchain_image_views` return type

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.

* #2473 changelog

* Fix `VulkanoWindowRenderer::acquire` taking `&Vec<T>` as well

* Replace cgmath with glam in the examples (#2475)

* 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>

* #2475 changelog

* Fix alignment checks when allocating buffers (#2476)

* #2476 changelog

* Add `DepthState::reverse` helper method (#2483)

* #2483 changelog

* Add runtime SPIR-V validation

* Remove copyright message

* fmt

---------

Co-authored-by: maratik123 <marat.buharov@gmail.com>
Co-authored-by: Okko Hakola <okkohakola@gmail.com>
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
Co-authored-by: Katt <51190960+coolcatcoder@users.noreply.github.com>
Co-authored-by: stefnotch <stefnotch@users.noreply.github.com>
Co-authored-by: José Miguel Sánchez García <soy.jmi2k@gmail.com>
2024-03-03 16:29:54 -06:00
Firestar99
16973acdab
added shader! generate_structs arg duplication error (#2485)
* shader struct name replacing

* added shader! `generate_structs` arg duplication error

* MacroInput.generate_structs is a bool rather than an Option<bool>

---------

Co-authored-by: Firestar99 <4696087-firestar99@users.noreply.gitlab.com>
2024-03-03 16:04:25 +01:00
Firestar99
1b7dfc9814
shader struct name replacing (#2484)
Co-authored-by: Firestar99 <4696087-firestar99@users.noreply.gitlab.com>
2024-03-03 15:47:23 +01:00
Rua
37e6120d3c
#2482 changelog 2024-03-03 15:25:08 +01:00
Firestar99
093b43e98d
General shader improvements, specifically targeting rust-gpu (#2482)
* added tests for codegen reflect()

* added tests for a typical rust-gpu shader

* make idents that are invalid be named UnnamedX instead of panicing

* add generate_structs option to shader! macro, to disable struct generating

* get rid of macro_use extern crate

* disallow specifying a shader type for binary shaders

* fix mesh shaders output interface not being arrayed

* structs in shader interface panic with explanatory message

* fix clippy lints

Co-authored-by: Rua <ruawhitepaw@gmail.com>

---------

Co-authored-by: Firestar99 <4696087-firestar99@users.noreply.gitlab.com>
Co-authored-by: Rua <ruawhitepaw@gmail.com>
2024-03-03 15:22:39 +01:00
Rua
50d82cdcde
#2483 changelog 2024-03-02 15:31:46 +01:00
José Miguel Sánchez García
eac4faea71
Add DepthState::reverse helper method (#2483) 2024-03-02 15:30:42 +01:00
Rua
1d2dbd27a2
#2476 changelog 2024-02-27 15:00:47 +01:00
marc0246
817436b13c
Fix alignment checks when allocating buffers (#2476) 2024-02-27 14:59:59 +01:00
marc0246
89e75cae2d
#2475 changelog 2024-02-21 09:31:45 +01:00
stefnotch
d60677b59e
Replace cgmath with glam in the examples (#2475)
* 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>
2024-02-21 09:30:15 +01:00
marc0246
1b91d4e5a9
Fix VulkanoWindowRenderer::acquire taking &Vec<T> as well 2024-02-21 09:24:50 +01:00
marc0246
4fcb869df2
#2473 changelog 2024-02-21 09:20:02 +01:00
marc0246
89cf5402d0
Fix VulkanoWindowRenderer::swapchain_image_views return type
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.
2024-02-21 09:19:09 +01:00
Katt
9a35fb0221
Make image_index and final_views accessible, and add new example. (#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>
2024-02-21 09:08:50 +01:00
marc0246
cdcaedc4f8
#2470 changelog 2024-02-20 14:06:32 +01:00
Rua
4074a91869
Add support for querying memory requirements directly from the device (#2470) 2024-02-20 14:06:07 +01:00
marc0246
4349c8e004
#2469 changelog 2024-02-20 14:01:03 +01:00
Rua
4eb8111055
Fix unnecessarily strict validation for DRM format modifiers (#2469) 2024-02-20 14:00:01 +01:00
Okko Hakola
c90c6e87c4
Remove windows specific dnd disable (#2474) 2024-02-20 13:23:30 +01:00
Rua
7b17d590a7
#2467 changelog 2024-02-15 19:56:41 +01:00
maratik123
3bb1f125df
Up vk version in shader compilation (#2467)
* Up vk version in shader compilation

* Update test in codegen.rs

* cargo +nightly fmt

* Update lib.rs

* clippy + fmt fixes

* simplify changes

* post merge
2024-02-15 19:55:56 +01:00
marc0246
3959fb5135
#2466 changelog 2024-02-15 16:48:37 +01:00
Rua
0fb4a7a437
Use vkGetDeviceQueue2 on Vulkan 1.1 and above (#2466) 2024-02-15 16:48:07 +01:00
Rua
8673aea5d0
Fix Rust 1.76 clippy warnings (#2462)
* Fix Rust 1.76 clippy warnings

* Fix doctest error
2024-02-15 16:39:02 +01:00
Rua
97d81c3689
Update COVERAGE.md 2024-02-14 13:49:00 +01:00
Rua
7794fdcbc5
maintenance4 is partially supported 2024-02-14 13:48:32 +01:00
Yousif
f27a0431ca
Fix link to vulkano book in README (#2459) 2024-01-30 11:07:19 +01:00
marc0246
94f50f18bd
Use hard-coded vertices in eligible examples (#2454)
* Use hard-coded vertices in eligible examples

* Remove outdated todos
2024-01-16 19:30:14 +01:00
marc0246
b202cb8813
Add lockfile entry that was missed in #2451 2024-01-15 04:17:50 +01:00
Rua
fde00fa9ad
#2452 changelog 2024-01-11 17:25:41 +01:00
daigennki
90c104c9f1
Fix wrong comparison in push constant size validation check (#2452)
* Fix wrong comparison in push constant size validation check

* Fix incorrectly placed backtick in validation error problem

Oops.
2024-01-11 17:24:53 +01:00
Martin Charles
9b6e307569
Add Minimal Offscreen Rendering Example (#2451)
* add offscreen example

* cleanup example

* more cleanup

* typo

* fix clippy

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* edits

* i'm loosing my marbles

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* formatting

* Update examples/offscreen/Cargo.toml

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

* cargo fmt

* more correct description

* import

* Update examples/offscreen/main.rs

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

* Update examples/offscreen/main.rs

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

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2024-01-11 01:37:17 +01:00
marc0246
fd352ec0f1
Cache dependencies in CI (#2449)
* Clean up CI config

* Cache Cargo home in CI

* Add `Cargo.lock`

* Use rust-cache

* Don't fail fast

* Disable the cache action for self-hosted runners
2024-01-10 02:26:35 -06:00
Hadrien G
e194406ae7
vulkan-utils -> vulkan-tools package naming fix (#2448)
There is no `vulkan-utils` package in current Ubuntu repos. But there used to be one in ubuntu 20.04, which was a compatibility alias for the `vulkan-tools` package that is still around. So I guess you meant `vulkan-tools`?
2024-01-06 19:31:52 +01:00
Rua
b64846e7a4
Minor reorganization of shader validation code (#2445)
* Minor reorganization of shader validation code

* Track call tree of SPIR-V functions

* Restore fixme
2024-01-05 14:10:50 +01:00
marc0246
eda954a670
Format code in doc comment code blocks (#2447)
* Format code in doc comment code blocks

* `cargo +nightly fmt`

* Finishing touches
2024-01-05 13:47:22 +01:00
marc0246
00b65b1299
Enforce a consistent comment width (#2444)
* Enforce comment width

* `cargo +nightly fmt`

* Finishing touches
2024-01-05 02:14:49 -06:00
marc0246
e7f37adfa9
Run clippy in CI (#2443)
* Run clippy in CI

* Fix clippy warnings in build output

* Update PR template
2024-01-05 02:08:36 -06:00
marc0246
e243c2699d
#2404 additions 2024-01-03 15:15:00 +01:00
marc0246
cf31f4e059
Check formatting in CI (#2442)
* Check formatting in CI

* Fix existing fomatting inconsistencies

* Update PR template
2024-01-03 02:45:14 -06:00
Firestar99
7788847b04
Mesh shading example (#2437)
* mesh-shader-triangle example: copied from instancing example

* mesh-shader-triangle example: move shaders to separate files

* mesh-shader example: rename example

* mesh-shader example: implement mesh shader generating geometry

* mesh-shader example: fix instance data indexing partially, still has struct alignment issues

* mesh-shader example: fixed instance buffer alignment issues

* remove unnecessary things

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

* mesh-shader example: cargo fmt

* mesh-shader example: rename shaders to end in .glsl

* mesh-shader example: added color out variable, docs

* mesh-shader example: rename shader again

* mesh-shader example: reformat shader code

* mesh-shader example: cargo fmt with nightly

---------

Co-authored-by: Firestar99 <4696087-firestar99@users.noreply.gitlab.com>
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2024-01-02 14:46:27 +01:00
Rua
ff1c71fa33
Add missing tickmarks (#2440) 2024-01-02 14:09:24 +01:00
marc0246
779d2dc485
#2438 changelog 2024-01-02 14:08:51 +01:00
Rua
9e82527698
Make QueryType a regular Vulkan enum (#2438)
* Make `QueryType` a regular Vulkan enum

* More consistency with Vulkan
2024-01-02 14:08:02 +01:00