From 1f31e85c5e8cf32afaaf5fc7160cb212e182a656 Mon Sep 17 00:00:00 2001 From: Rua Date: Mon, 3 Apr 2023 01:38:06 +0200 Subject: [PATCH] Release Vulkano 0.33.0 (#2169) * Release Vulkano 0.33.0 * Update changelog for recent changes * Derp --- CHANGELOG.md | 19 ++++++++++----- vulkano-shaders/Cargo.toml | 9 +++----- vulkano-shaders/src/lib.rs | 23 ++++++++---------- vulkano-util/Cargo.toml | 6 ++--- vulkano-win/Cargo.toml | 9 +++----- vulkano/Cargo.toml | 4 ++-- vulkano/macros/Cargo.toml | 2 +- vulkano/src/command_buffer/mod.rs | 27 +++++++++++----------- vulkano/src/command_buffer/standard/mod.rs | 2 ++ vulkano/src/lib.rs | 15 ++++++------ vulkano/src/memory/alignment.rs | 2 +- 11 files changed, 59 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ed4d99a..d15a208c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,16 @@ ### Public dependency updates +### Breaking changes + +### Additions + +### Bugs fixed + +# Version 0.33.0 (2023-04-01) + +### Public dependency updates + - [ash](https://crates.io/crates/ash) 0.37.2 - [bytemuck](https://crates.io/crates/bytemuck) 1.9 - [nalgebra](https://crates.io/crates/nalgebra) 0.32 @@ -75,15 +85,11 @@ Changes to vulkano-shaders: - The `ty` module is no longer generated. All types are generated in the same module where the macro call resides. ### Additions -- Added `CpuBufferAllocatorCreateInfo`. + +- Added `SubbufferAllocatorCreateInfo`. - Allow waiting on `SwapchainAcquireFuture`. - Implement `IntoIterator` for `Features`, `DeviceExtensions` and `InstanceExtensions`. -- A new `CommandBufferBuilder` type, that provides validation and keeps resources alive, but requires manual synchronization commands. -- The `PrimaryCommandBuffer` and `SecondaryCommandBuffer` types. - A `buffer_with_range` constructor for `WriteDescriptorSet`, which can be used to select the range within the buffer that should be bound. This must be used when using dynamic buffers. -- Better cgmath and nalgebra support, enabled by the `cgmath` or `nalgebra` features: -- `VertexMember` is now implemented for cgmath `Vector`s and `Point`s. -- `type_for_format_cgmath` and `type_for_format_nalgebra` macros, next to the existing `type_for_format` macro. - Added a derive macro for the `Vertex` trait. The `impl_vertex` macro and `VertexMember` trait are deprecated. - `BufferDefinition` matching logic was updated to work with the new `VertexMemberInfo` and now matches based on scalar type, number of components and number of elements allowing the use of formats such as `*_UNORM`. - `GraphicsPipelineBuilder` validation was extended to make sure locations are not bound multiple times when a single attribute spans multiple locations (e.g. using double precision float formats). @@ -108,6 +114,7 @@ Changes to vulkano-shaders: - Vulkano-win: The features `winit` and `raw-window-handle` can now be used directly, `winit_` and `raw-window-handle_` have been deprecated. ### Bugs fixed + - [#2094](https://github.com/vulkano-rs/vulkano/issues/2094): Fixed debug assertion when the first command in a command buffer that uses an image expects it to be in the `Undefined` layout. - Fixed wrong aspects being used in pipeline barriers when an image view selects one aspect of a combined depth+stencil image. - Fixed panic when building a finished command buffer, if the command buffer contains commands that use only some subresources of an image. diff --git a/vulkano-shaders/Cargo.toml b/vulkano-shaders/Cargo.toml index 0d67c483..255378e3 100644 --- a/vulkano-shaders/Cargo.toml +++ b/vulkano-shaders/Cargo.toml @@ -1,11 +1,8 @@ [package] name = "vulkano-shaders" -version = "0.32.0" +version = "0.33.0" edition = "2021" -authors = [ - "Pierre Krieger ", - "The vulkano contributors", -] +authors = ["Pierre Krieger ", "The vulkano contributors"] repository = "https://github.com/vulkano-rs/vulkano" description = "Shaders rust code generation macro" license = "MIT/Apache-2.0" @@ -24,7 +21,7 @@ proc-macro2 = "1.0" quote = "1.0" shaderc = "0.8" syn = { version = "1.0", features = ["full", "extra-traits"] } -vulkano = { version = "0.32.0", path = "../vulkano" } +vulkano = { version = "0.33.0", path = "../vulkano" } [features] shaderc-build-from-source = ["shaderc/build-from-source"] diff --git a/vulkano-shaders/src/lib.rs b/vulkano-shaders/src/lib.rs index d85111ff..63ef83fb 100644 --- a/vulkano-shaders/src/lib.rs +++ b/vulkano-shaders/src/lib.rs @@ -1,13 +1,6 @@ //! The procedural macro for vulkano's shader system. //! Manages the compile-time compilation of GLSL into SPIR-V and generation of associated Rust code. //! -//! # Cargo features -//! -//! | Feature | Description | -//! |-----------------------------|---------------------------------------------------------| -//! | `shaderc-build-from-source` | Build the `shaderc` library from source when compiling. | -//! | `shaderc-debug` | Compile shaders with debug information included. | -//! //! # Basic usage //! //! ``` @@ -200,6 +193,13 @@ //! //! The crate fails to compile but prints the generated Rust code to stdout. //! +//! # Cargo features +//! +//! | Feature | Description | +//! |-----------------------------|---------------------------------------------------------| +//! | `shaderc-build-from-source` | Build the `shaderc` library from source when compiling. | +//! | `shaderc-debug` | Compile shaders with debug information included. | +//! //! [cargo-expand]: https://github.com/dtolnay/cargo-expand //! [`ShaderModule::from_words_with_data`]: vulkano::shader::ShaderModule::from_words_with_data //! [`SpecializationConstants`]: vulkano::shader::SpecializationConstants @@ -732,19 +732,14 @@ impl Parse for MacroInput { } } -#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] enum LinAlgType { + #[default] Std, CgMath, Nalgebra, } -impl Default for LinAlgType { - fn default() -> Self { - LinAlgType::Std - } -} - macro_rules! bail { ($msg:literal $(,)?) => { return Err(syn::Error::new( diff --git a/vulkano-util/Cargo.toml b/vulkano-util/Cargo.toml index a9bed16f..a221829e 100644 --- a/vulkano-util/Cargo.toml +++ b/vulkano-util/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vulkano-util" -version = "0.32.0" +version = "0.33.0" edition = "2021" authors = ["The vulkano contributors"] repository = "https://github.com/vulkano-rs/vulkano" @@ -13,6 +13,6 @@ categories = ["rendering::graphics-api"] [dependencies] ahash = "0.8" -vulkano = { version = "0.32.0", path = "../vulkano" } -vulkano-win = { version = "0.32.0", path = "../vulkano-win" } +vulkano = { version = "0.33.0", path = "../vulkano" } +vulkano-win = { version = "0.33.0", path = "../vulkano-win" } winit = { version = "0.28" } diff --git a/vulkano-win/Cargo.toml b/vulkano-win/Cargo.toml index 671a37ce..7d2b6f3e 100644 --- a/vulkano-win/Cargo.toml +++ b/vulkano-win/Cargo.toml @@ -1,11 +1,8 @@ [package] name = "vulkano-win" -version = "0.32.0" +version = "0.33.0" edition = "2021" -authors = [ - "Pierre Krieger ", - "The vulkano contributors", -] +authors = ["Pierre Krieger ", "The vulkano contributors"] repository = "https://github.com/vulkano-rs/vulkano" description = "Link between vulkano and winit" license = "MIT/Apache-2.0" @@ -23,7 +20,7 @@ winit_ = ["dep:winit", "dep:objc", "dep:core-graphics-types"] [dependencies] raw-window-handle = { version = "0.5", optional = true } -vulkano = { version = "0.32.0", path = "../vulkano" } +vulkano = { version = "0.33.0", path = "../vulkano" } winit = { version = "0.28", optional = true } [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] diff --git a/vulkano/Cargo.toml b/vulkano/Cargo.toml index b07d8a9b..0b563c15 100644 --- a/vulkano/Cargo.toml +++ b/vulkano/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vulkano" -version = "0.32.0" +version = "0.33.0" edition = "2021" authors = [ "Pierre Krieger ", @@ -30,7 +30,7 @@ parking_lot = { version = "0.12", features = ["send_guard"] } serde = { version = "1.0", optional = true } smallvec = "1.8" thread_local = "1.1" -vulkano-macros = { path = "macros", version = "0.32.0" } +vulkano-macros = { path = "macros", version = "0.33.0" } [target.'cfg(target_os = "ios")'.dependencies] objc = "0.2.5" diff --git a/vulkano/macros/Cargo.toml b/vulkano/macros/Cargo.toml index 89c5ce8b..7170cb75 100644 --- a/vulkano/macros/Cargo.toml +++ b/vulkano/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vulkano-macros" -version = "0.32.0" +version = "0.33.0" edition = "2021" authors = ["Pierre Krieger ", "The vulkano contributors"] repository = "https://github.com/vulkano-rs/vulkano" diff --git a/vulkano/src/command_buffer/mod.rs b/vulkano/src/command_buffer/mod.rs index cb2dc936..5808d51b 100644 --- a/vulkano/src/command_buffer/mod.rs +++ b/vulkano/src/command_buffer/mod.rs @@ -31,10 +31,10 @@ //! //! There are two levels of command buffers: //! -//! - [`PrimaryCommandBuffer`] can be executed on a queue, and is the main command buffer type. -//! It cannot be executed within another command buffer. -//! - [`SecondaryCommandBuffer`] can only be executed within a primary command buffer, not directly -//! on a queue. +//! - [`PrimaryCommandBufferAbstract`] can be executed on a queue, and is the main command buffer +//! type. It cannot be executed within another command buffer. +//! - [`SecondaryCommandBufferAbstract`] can only be executed within a primary command buffer, +//! not directly on a queue. //! //! Using secondary command buffers, there is slightly more overhead than using primary command //! buffers alone, but there are also advantages. A single command buffer cannot be recorded @@ -48,15 +48,16 @@ //! # Recording a command buffer //! //! To record a new command buffer, the most direct way is to create a new -//! [`CommandBufferBuilder`]. You can then call methods on this object to record new commands to +//! [`AutoCommandBufferBuilder`]. You can then call methods on this object to record new commands to //! the command buffer. When you are done recording, you call [`build`] to finalise the command -//! buffer and turn it into either a [`PrimaryCommandBuffer`] or a [`SecondaryCommandBuffer`]. +//! buffer and turn it into either a [`PrimaryCommandBufferAbstract`] or a +//! [`SecondaryCommandBufferAbstract`]. //! -//! Using the standard `CommandBufferBuilder`, you must enter synchronization commands such as -//! [pipeline barriers], to ensure that there are no races and memory access hazards. This can be -//! difficult to do manually, so Vulkano also provides an alternative builder, -//! [`AutoCommandBufferBuilder`]. Using this builder, you do not have to worry about managing -//! synchronization, but the end result may not be quite as efficient. +// //! Using the standard `CommandBufferBuilder`, you must enter synchronization commands such as +// //! [pipeline barriers], to ensure that there are no races and memory access hazards. This can be +// //! difficult to do manually, so Vulkano also provides an alternative builder, +// //! [`AutoCommandBufferBuilder`]. Using this builder, you do not have to worry about managing +// //! synchronization, but the end result may not be quite as efficient. //! //! # Submitting a primary command buffer //! @@ -108,7 +109,7 @@ //! [`GpuFuture`]: crate::sync::GpuFuture #[doc(no_inline)] -pub use self::standard::{CommandBufferBuilder, PrimaryCommandBuffer, SecondaryCommandBuffer}; +pub(crate) use self::standard::{PrimaryCommandBuffer, SecondaryCommandBuffer}; pub use self::{ auto::{ AutoCommandBufferBuilder, BuildError, CommandBufferBeginError, PrimaryAutoCommandBuffer, @@ -154,7 +155,7 @@ pub mod allocator; mod auto; mod commands; pub mod pool; -pub mod standard; +pub(crate) mod standard; pub mod synced; pub mod sys; mod traits; diff --git a/vulkano/src/command_buffer/standard/mod.rs b/vulkano/src/command_buffer/standard/mod.rs index 6cfeae3c..56b6b9e2 100644 --- a/vulkano/src/command_buffer/standard/mod.rs +++ b/vulkano/src/command_buffer/standard/mod.rs @@ -12,6 +12,8 @@ //! Using `CommandBufferBuilder`, you must manually record synchronization commands to ensure //! correct operation. +#![allow(dead_code)] + pub use self::builder::*; use super::{ allocator::{CommandBufferAlloc, StandardCommandBufferAlloc}, diff --git a/vulkano/src/lib.rs b/vulkano/src/lib.rs index 82e0c090..dc4b7ef6 100644 --- a/vulkano/src/lib.rs +++ b/vulkano/src/lib.rs @@ -10,13 +10,6 @@ #![doc(html_logo_url = "https://raw.githubusercontent.com/vulkano-rs/vulkano/master/logo.png")] //! Safe and rich Rust wrapper around the Vulkan API. //! -//! # Cargo features -//! -//! | Feature | Description | -//! |----------------------|-------------------------------------------------------------------------------| -//! | `document_unchecked` | Include `_unchecked` functions in the generated documentation. | -//! | `serde` | Enables (de)serialization of certain types using [`serde`]. | -//! //! # Starting off with Vulkano //! //! The steps for using Vulkan through Vulkano are in principle not any different from using @@ -101,6 +94,13 @@ //! `document_unchecked` cargo feature, and then generating the documentation with the command //! `cargo doc --open`. //! +//! # Cargo features +//! +//! | Feature | Description | +//! |----------------------|-------------------------------------------------------------------------------| +//! | `document_unchecked` | Include `_unchecked` functions in the generated documentation. | +//! | `serde` | Enables (de)serialization of certain types using [`serde`]. | +//! //! [`cgmath`]: https://crates.io/crates/cgmath //! [`nalgebra`]: https://crates.io/crates/nalgebra //! [`serde`]: https://crates.io/crates/serde @@ -136,6 +136,7 @@ #![allow( clippy::collapsible_else_if, clippy::collapsible_if, + clippy::derivable_impls, // TODO: remove clippy::large_enum_variant, clippy::len_without_is_empty, clippy::missing_safety_doc, // TODO: remove diff --git a/vulkano/src/memory/alignment.rs b/vulkano/src/memory/alignment.rs index ec5afacb..290240bb 100644 --- a/vulkano/src/memory/alignment.rs +++ b/vulkano/src/memory/alignment.rs @@ -145,7 +145,7 @@ impl From for DeviceSize { // This is a false-positive, the underlying values that this impl and the derived `PartialEq` work // with are the same. -#[allow(clippy::derive_hash_xor_eq)] +#[allow(clippy::derived_hash_with_manual_eq)] impl Hash for DeviceAlignment { #[inline] fn hash(&self, state: &mut H) {