Skip to content

Commit

Permalink
Release Vulkano 0.33.0 (#2169)
Browse files Browse the repository at this point in the history
* Release Vulkano 0.33.0

* Update changelog for recent changes

* Derp
  • Loading branch information
Rua authored Apr 2, 2023
1 parent 83557af commit 1f31e85
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 59 deletions.
19 changes: 13 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand All @@ -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.
Expand Down
9 changes: 3 additions & 6 deletions vulkano-shaders/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
[package]
name = "vulkano-shaders"
version = "0.32.0"
version = "0.33.0"
edition = "2021"
authors = [
"Pierre Krieger <pierre.krieger1708@gmail.com>",
"The vulkano contributors",
]
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>", "The vulkano contributors"]
repository = "https://github.com/vulkano-rs/vulkano"
description = "Shaders rust code generation macro"
license = "MIT/Apache-2.0"
Expand All @@ -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"]
Expand Down
23 changes: 9 additions & 14 deletions vulkano-shaders/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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
//!
//! ```
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions vulkano-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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" }
9 changes: 3 additions & 6 deletions vulkano-win/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
[package]
name = "vulkano-win"
version = "0.32.0"
version = "0.33.0"
edition = "2021"
authors = [
"Pierre Krieger <pierre.krieger1708@gmail.com>",
"The vulkano contributors",
]
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>", "The vulkano contributors"]
repository = "https://github.com/vulkano-rs/vulkano"
description = "Link between vulkano and winit"
license = "MIT/Apache-2.0"
Expand All @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions vulkano/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vulkano"
version = "0.32.0"
version = "0.33.0"
edition = "2021"
authors = [
"Pierre Krieger <pierre.krieger1708@gmail.com>",
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion vulkano/macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vulkano-macros"
version = "0.32.0"
version = "0.33.0"
edition = "2021"
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>", "The vulkano contributors"]
repository = "https://github.com/vulkano-rs/vulkano"
Expand Down
27 changes: 14 additions & 13 deletions vulkano/src/command_buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
//!
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions vulkano/src/command_buffer/standard/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
15 changes: 8 additions & 7 deletions vulkano/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vulkano/src/memory/alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl From<DeviceAlignment> 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<H: Hasher>(&self, state: &mut H) {
Expand Down

0 comments on commit 1f31e85

Please sign in to comment.