Commit Graph

323 Commits

Author SHA1 Message Date
Rua
e9c650c966
Use workspace lints (#2505)
* Use workspace lints

* Use underscores for the lints, since they are canonically written that way

* Put lints after features
2024-03-28 11:58:43 +01: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
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
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
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
Rua
bef7b94aef
Fix warnings for Rust 1.75 (#2436) 2023-12-28 20:32:13 +01:00
Rua
655ca5e6c9
Add support for the ext_mesh_shader extension (#2433)
* Add support for the `ext_mesh_shader` extension

* Helper function for queries

* Documentation update

* Add mesh primitives generated query

* Derp

* Support in vulkano-shaders too

* More doc fixes

* Better docs, explicitly saying when the values must be `Some` or `None`.

* Update vulkano/src/pipeline/graphics/mod.rs

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

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-12-28 19:44:22 +01:00
Rua
a17d8f5cb5
Some shader parse refactoring and additions (#2414) 2023-12-01 13:16:21 +01:00
marc0246
34736a675a
Remove license notices from source files (#2401)
* Remove license notices from source files

* Add license notices for rangemap
2023-11-08 13:49:49 +01:00
marc0246
1e9128795f
Workspace dependencies (#2381)
* Use workspace dependencies

* Update CI workflow to account for the two workspaces

* Make the tables in the root workspace a bit nicer to look at

* Use workspace package version

* Remove workspace package version

* Make winit a workspace dependency as well
2023-10-29 22:42:00 -05:00
marc0246
1964ae7922
Fix Cargo manifests (#2377)
* Fix Cargo manifests

* Oopsie
2023-10-29 18:54:11 +01:00
Rua
755dcbc6e2
Release Vulkano 0.34.0 (#2367) 2023-10-24 18:54:46 +02:00
Rua
0175bcd2a6
Add DeviceAddress, handle pointers as SPIR-V struct members (#2351)
* Add `DeviceAddress`, handle pointers as SPIR-V struct members

* Add pointers to vulkano-shaders
2023-10-07 15:13:58 +02:00
Alexander Rohde
ba4d11afa9
Allow for setting the array length in a shader using a specialization constant. (#2345) 2023-10-03 17:32:39 +02:00
Rua
a8ca0a7f7f
Refactor some shader things and add more validation (#2335)
* Refactor some shader things and add more validation

* Remove pub
2023-09-21 12:18:31 +02:00
Rua
3c49541bc3
Apply specialization to shader reflection (#2329)
* Apply specialization to shader reflection

* Remove redundant method

* Remove all the SpecId decorations too

* Don't unnecessarily collect the instructions

* Replace decoration groups with individual decorations

* Rename with_specialization

* Missed renames

* Remove the Arcs
2023-09-14 13:19:25 +02:00
charles-r-earp
ee4e3089d3
Added required_subgroup_size to PipelineShaderStageCreateInfo (#2235)
* Added required_subgroup_size to PipelineShaderStageCreateInfo

* Added validation errors.

* Fixed error msgs / vuids.

* ComputeShaderExecution for validating local_size.

* WorkgroupSizeId reflection.

* contains_enum

* Reworked ComputeShaderExecution.

* panic msgs.

* workgroup size validation

* unused import

* fixed test deprecated fn

* catch workgroup size overflow

* EntryPointInfo::local_size docs

* comments

* typo + error msg
2023-08-18 13:37:10 +02:00
Kevin Ji
4133a3bf63
Use OR operator in Cargo.toml license field (#2293)
The use of `/` is deprecated, per the Cargo reference:
https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields
2023-08-18 13:36:49 +02:00
Rua
5ca4805cbf
Fix #2203 (#2284) 2023-08-09 21:25:05 +02:00
Rua
c0379fce96
Remove remaining old error types, other cleanup (#2281)
* Remove remaining old error types, other cleanup

* Fix

* Add and fix or_fun_call lints

* Update vulkano/src/query.rs

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

* Fix slightly borked context messages

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-08-09 21:19:38 +02:00
Rua
cf8e8c3732
Some shader fixes and improvements (#2280) 2023-08-05 16:47:17 +02:00
Rua
d0144c2d98
ValidationError-ify commands, add some validation to UnsafeCommandBufferBuilder (#2266)
* ValidationError-ify commands, add some validation to `UnsafeCommandBufferBuilder`

* Use `SubpassBeginInfo` for the triangle example
2023-08-04 20:55:16 +02:00
Rua
17dbd1ac2c
ValidationError-ify ShaderModule (#2268)
* 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>
2023-07-24 22:21:05 +02:00
Rua
5a0bd555e9
Update dependencies (#2241) 2023-06-28 22:11:56 +02:00
Rua
b7679f8bbb
Rewrite shader and specialization handling in pipelines (#2181)
* Rewrite shader and specialization handling in pipelines

* Make the shader loading in examples a bit cleaner

* Forgot some

* Fix incorrect color blend states in examples

* Nicer fix

* Use mem::discriminant

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

---------

Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-04-18 20:53:08 +02:00
Firestar99
9ba796d453
Add root_path_env property to shaders macro (#2180)
* shaders: minor fix that some Vecs were always allocated with capacity of 0

* shaders: add root_path_env property to allow loading shaders generated by a build script

* shaders: Apply root_path_env suggestions from code review

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

* shaders: added root_path_env docs about env vars specified by a build script

---------

Co-authored-by: Firestar99 <4696087-firestar99@users.noreply.gitlab.com>
Co-authored-by: marc0246 <40955683+marc0246@users.noreply.github.com>
2023-04-11 11:28:45 +02:00
marc0246
096d3bc660
Publish vulkano-macros (#2175)
* Publish vulkano-macros

* Document `vulkano-macros`

* Make macros dependency optional

* Document `macros` feature

* Fix outdated docs

* Derp
2023-04-02 23:33:01 -05:00
Rua
1f31e85c5e
Release Vulkano 0.33.0 (#2169)
* Release Vulkano 0.33.0

* Update changelog for recent changes

* Derp
2023-04-02 18:38:06 -05:00
Rua
41ded32156
Update dependencies, clippy warnings (#2142)
* Update dependencies, clippy warnings

* Remove allowed clippy lint that no longer triggers as of Rust 1.67.1
2023-03-05 20:12:17 -06:00
marc0246
baf863ce33
Resolve restrictions of BufferContents, add support for allocating all types of buffers, and rework vulkano-shaders (#2132)
* Add `BufferContentsLayout`

* Rework `BufferContents`

* Add `BufferContents` derive macro

* Relax restrictions of shader code generation

* Fix examples

* Add additional invariant to `Subbuffer`

* Shorten paths a bit

* Remove a bit of bloat

* Add `Sized` constraint to element traits

* Fix an oopsie

* Add `Aligned`

* Add support for deriving `BufferContents` for sized types

* Fix alignment and padding issues

* Fix docs and add examples for `BufferContents`

* Adjust shader macro

* Add tests

* Adjust `Vertex` example

* Remove bytemuck re-export

* Update examples

* Workaround bytemuck's array elements that are `AnyBitPattern` limitation

* Add more alignments

* Fix an earlier oopsie

* Rework vulkano-shaders

* Fix examples

* Fix some rogue tabs in examples

* Add `AsRef` and `AsMut` implementation for `Padded`

* Remove useless code duplication

* Make the `BufferContents` derive macro the same for all types

* Add example docs for `Padded`

* Work around trivial bounds

* More example docs

* Minor consistency adjustment

* Add `serde` to the list of cargo features

* Make clippy happy again
2023-03-05 19:56:35 +01:00
Andrew
58fe067033
remove extraneous comma in shader entry point generation (#2136) 2023-02-15 14:43:02 +01:00
Rua
41a37735d1
Automatically derive Pod and Zeroable for structs generated by vulkano-shaders (#2117) 2022-12-30 03:18:25 -06:00
Rua
f08e8767a9
Document features of each crate (#2115) 2022-12-30 03:14:43 -06:00
Rua
0b0c4662e9
Add more support for cgmath and nalgebra types (#2107) 2022-12-21 07:50:56 -06:00
Rua
6eb526322b
Fix clippy warnings from Rust 1.66 (#2105) 2022-12-18 10:23:40 -06:00
Rua
79c39ecb06
Add synchronization tracking for render pass operations (#2101) 2022-12-13 07:46:48 -06:00
Rua
4d95604e1a
Update Ash to 0.37.1 (#2096)
* Update Ash to 0.37.1

* typo

* Add support for new shader/pipeline stages and access flags

* Small change

* Fixes

* Use ^ for version
2022-12-02 10:17:45 -06:00
Rua
4ccfc925fa
Refactor DescriptorRequirements (#2081) 2022-11-09 03:35:50 -06:00
Rua
a984a925c4
Use actual integer bitflags for Vulkan bitflag types (#2073)
* Use actual integer bitflags for Vulkan bitflag types

* Fix doc tests

* Fix Fence and Semaphore on Win32 and Fuchsia

* Add macro for bitflags that have a corresponding enum

* Fix bug
2022-11-05 00:02:28 -05:00
Rua
1f1c2322b6
Release Vulkano 0.32.0 (#2061)
* Release Vulkano 0.32.0

* Update CHANGELOG.md

Co-authored-by: Austin Johnson <me@austinj.me>
2022-10-31 03:09:41 -05:00
marc0246
b8d7cc3241
The deed (#2016) 2022-10-04 10:50:58 +02:00
marc0246
7e3515e6eb
Replace generics with impl Trait (#2017) 2022-10-04 10:06:36 +02:00
marc0246
1c2d195dab
Improvements to caches and switch to ahash (#2019)
* Add `OnceCache`

* Switch to `ahash`
2022-10-04 10:04:52 +02:00
Rua
f78e06fc6e
#2007 fixes (#2008) 2022-10-01 21:19:25 -05:00
Rua
9a50d6ca56
Fix handling of runtime sized arrays in shaders (#1992)
* Fix handling of runtime sized arrays in shaders

* Small fix
2022-09-22 02:11:30 -05:00
Austin Johnson
137fb9f24b
Release 0.31 (#1990) 2022-09-18 05:46:53 -05:00
Rua
b06b29afd2
Better validation and errors (#1966)
* Better validation and errors

* Small fix
2022-09-09 22:41:52 -05:00
Rua
2705984c77
Macrofy all Vulkan bitflag and enum types, check for device support (#1964) 2022-09-05 15:16:40 -05:00