Skip to content

Commit bdc4a81

Browse files
authored
ash v0.38 support (#75)
* ash v0.38 * ash-molten v0.19 * ash-window v0.13 * gpu-allocator v0.27 * raw-window-handle v0.6 * vk-sync-rs, egui, imgui, winit-input-helper crates using git versions
1 parent 564883b commit bdc4a81

77 files changed

Lines changed: 2112 additions & 1767 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
66
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## Unreleased
9+
10+
### Changed
11+
12+
- Updated `ash` to v0.38
13+
- Updated `winit` to v0.30 (_and moved related functionality to new `screen-13-window` crate_)
14+
15+
### Removed
16+
17+
- `log` and `winit` are no longer exported by `use screen_13::prelude::*`
18+
819
## [0.11.4] - 2024-07-16
920

1021
### Fixed

Cargo.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "screen-13"
3-
version = "0.11.4"
3+
version = "0.12.0"
44
authors = ["John Wells <john@attackgoat.com>"]
55
edition = "2021"
66
license = "MIT OR Apache-2.0"
@@ -20,22 +20,21 @@ profile-with-superluminal = ["profiling/profile-with-superluminal"]
2020
profile-with-tracy = ["profiling/profile-with-tracy"]
2121

2222
[dependencies]
23-
ash = ">=0.37.1, <0.38"
24-
ash-window = "0.12"
23+
ash = "0.38"
24+
ash-window = "0.13"
2525
derive_builder = "0.20"
26-
gpu-allocator = "0.26"
26+
gpu-allocator = "0.27"
2727
log = "0.4"
2828
ordered-float = "4.1"
2929
parking_lot = { version = "0.12", optional = true }
3030
paste = "1.0"
3131
profiling = "1.0"
32-
raw-window-handle = "0.5"
32+
raw-window-handle = "0.6"
3333
spirq = "1.2"
34-
vk-sync = { version = "0.4.0", package = "vk-sync-fork" } # // SEE: https://github.com/gwihlidal/vk-sync-rs/pull/4 -> https://github.com/expenses/vk-sync-rs
35-
winit = { version = "0.29", features = ["rwh_05"] }
34+
vk-sync = { git = "https://github.com/attackgoat/vk-sync-rs.git", rev = "19fc3f811cc1d38b2231cdb8840fddf271879ac1", package = "vk-sync-fork" } #version = "0.4.0", package = "vk-sync-fork" } # // SEE: https://github.com/gwihlidal/vk-sync-rs/pull/4 -> https://github.com/expenses/vk-sync-rs
3635

3736
[target.'cfg(target_os = "macos")'.dependencies]
38-
ash-molten = "0.17"
37+
ash-molten = "0.19"
3938

4039
[dev-dependencies]
4140
anyhow = "1.0"
@@ -58,5 +57,7 @@ reqwest = { version = "0.12", features = ["blocking"] }
5857
screen-13-fx = { path = "contrib/screen-13-fx" }
5958
screen-13-imgui = { path = "contrib/screen-13-imgui" }
6059
screen-13-egui = { path = "contrib/screen-13-egui" }
60+
screen-13-window = { path = "contrib/screen-13-window" }
6161
tobj = "4.0"
62-
winit_input_helper = "0.16"
62+
winit = "0.30"
63+
winit_input_helper = { git = "https://github.com/stefnotch/winit_input_helper.git", rev = "6e76a79d01ce836c01b9cdeaa98846a6f0955dc4" } #"0.16"

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ screen-13 = "0.11"
1616

1717
_Screen 13_ provides a high performance [Vulkan](https://www.vulkan.org/) driver using smart
1818
pointers. The driver may be created manually for headless rendering or automatically using the
19-
built-in event loop abstraction:
19+
built-in window abstraction:
2020

2121
```rust
22-
use screen_13::prelude::*;
22+
use screen_13_window::{Window, WindowError};
2323

24-
fn main() -> Result<(), DisplayError> {
25-
EventLoop::new().build()?.run(|frame| {
24+
fn main() -> Result<(), WindowError> {
25+
Window::new()?.run(|frame| {
2626
// It's time to do some graphics! 😲
2727
})
2828
}

contrib/rel-mgmt/check

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,25 @@ cargo fmt --manifest-path examples/skeletal-anim/Cargo.toml && diff || fail "Unf
2525
cargo fmt --manifest-path examples/vr/Cargo.toml && diff || fail "Unformatted rust code (vr)"
2626

2727
# Rust code errors
28+
echo "Checking screen-13"
2829
cargo check --all-targets
30+
echo "Checking screen-13 (w/ parking_lot)"
2931
cargo check --all-targets --features parking_lot
32+
echo "Checking contrib/screen-13-egui"
3033
cargo check --manifest-path contrib/screen-13-egui/Cargo.toml --all-targets --all-features
34+
echo "Checking contrib/screen-13-fx"
3135
cargo check --manifest-path contrib/screen-13-fx/Cargo.toml --all-targets --all-features
36+
echo "Checking contrib/screen-13-hot"
3237
cargo check --manifest-path contrib/screen-13-hot/Cargo.toml --all-targets --all-features
33-
cargo check --manifest-path contrib/screen-13-imgui/Cargo.toml --all-targets --all-features
38+
#echo "Checking contrib/screen-13-imgui"
39+
#cargo check --manifest-path contrib/screen-13-imgui/Cargo.toml --all-targets --all-features
40+
echo "Checking contrib/screen-13-window"
41+
cargo check --manifest-path contrib/screen-13-window/Cargo.toml --all-targets --all-features
42+
echo "Checking examples/shader-toy"
3443
cargo check --manifest-path examples/shader-toy/Cargo.toml --all-targets --all-features
44+
echo "Checking examples/skeletal-anim"
3545
cargo check --manifest-path examples/skeletal-anim/Cargo.toml --all-targets --all-features
46+
echo "Checking examples/vr"
3647
cargo check --manifest-path examples/vr/Cargo.toml --all-targets --all-features
3748

3849
# Rust code lints
@@ -41,7 +52,7 @@ cargo clippy --all-targets --features parking_lot
4152
cargo clippy --manifest-path contrib/screen-13-egui/Cargo.toml --all-targets --all-features
4253
cargo clippy --manifest-path contrib/screen-13-fx/Cargo.toml --all-targets --all-features
4354
cargo clippy --manifest-path contrib/screen-13-hot/Cargo.toml --all-targets --all-features
44-
cargo clippy --manifest-path contrib/screen-13-imgui/Cargo.toml --all-targets --all-features
55+
#cargo clippy --manifest-path contrib/screen-13-imgui/Cargo.toml --all-targets --all-features
4556
cargo clippy --manifest-path examples/shader-toy/Cargo.toml --all-targets --all-features
4657
cargo clippy --manifest-path examples/skeletal-anim/Cargo.toml --all-targets --all-features
4758
cargo clippy --manifest-path examples/vr/Cargo.toml --all-targets --all-features

contrib/rel-mgmt/run-all-examples

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -e
55
# Update everything
66
cargo update
77
cargo update --manifest-path contrib/screen-13-hot/Cargo.toml
8+
cargo update --manifest-path contrib/screen-13-window/Cargo.toml
89
cargo update --manifest-path examples/skeletal-anim/Cargo.toml
910
cargo update --manifest-path examples/shader-toy/Cargo.toml
1011
cargo update --manifest-path examples/vr/Cargo.toml
@@ -13,10 +14,10 @@ cargo update --manifest-path examples/vr/Cargo.toml
1314
cargo build --examples
1415

1516
# Run the "test" example first
16-
# cargo run --example fuzzer
17+
cargo run --example fuzzer
1718

1819
# Run all regular examples, in debug mode, next
19-
cargo run --example hello_world
20+
cargo run --manifest-path contrib/screen-13-window/Cargo.toml --example hello_world
2021
cargo run --example aliasing
2122
cargo run --example cpu_readback
2223
cargo run --example subgroup_ops

contrib/screen-13-egui/Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ readme = "README.md"
88

99
[dependencies]
1010
bytemuck = "1.14"
11-
egui = { version = "0.26", features = [
12-
"bytemuck"
13-
] }
14-
egui-winit = "0.26"
11+
# TODO: Waiting for egui to update winit version
12+
egui = { git = "https://github.com/emilk/egui.git", rev = "3777b8d2741f298eaa1409dc08062902f7541990" } #{ version = "0.28", features = ["bytemuck"] }
13+
egui-winit = { git = "https://github.com/emilk/egui.git", rev = "3777b8d2741f298eaa1409dc08062902f7541990" } #"0.28"
1514
inline-spirv = "0.2"
1615
screen-13 = { path = "../.." }
1716
screen-13-fx = { path = "../screen-13-fx" }

contrib/screen-13-egui/src/lib.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub use egui;
66

77
use {
88
bytemuck::cast_slice,
9+
egui_winit::winit::{event::Event, event_loop::EventLoop, window::Window},
910
screen_13::prelude::*,
1011
std::{borrow::Cow, collections::HashMap, sync::Arc},
1112
};
@@ -21,10 +22,7 @@ pub struct Egui {
2122
}
2223

2324
impl Egui {
24-
pub fn new(
25-
device: &Arc<Device>,
26-
event_loop: &egui_winit::winit::event_loop::EventLoopWindowTarget<()>,
27-
) -> Self {
25+
pub fn new(device: &Arc<Device>, event_loop: &EventLoop<()>) -> Self {
2826
let ppl = Arc::new(
2927
GraphicPipeline::create(
3028
device,
@@ -58,9 +56,6 @@ impl Egui {
5856
);
5957

6058
let ctx = egui::Context::default();
61-
let native_pixels_per_point = event_loop
62-
.primary_monitor()
63-
.map(|monitor| monitor.scale_factor() as f32);
6459
let max_texture_side = Some(
6560
device
6661
.physical_device
@@ -72,7 +67,8 @@ impl Egui {
7267
ctx.clone(),
7368
egui::ViewportId::ROOT,
7469
event_loop,
75-
native_pixels_per_point,
70+
None,
71+
None,
7672
max_texture_side,
7773
);
7874

contrib/screen-13-fx/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ bmfont = { version = "0.3", default-features = false }
2727
bytemuck = "1.14"
2828
parking_lot = "0.12"
2929
inline-spirv = "0.2"
30+
log = "0.4"
3031
screen-13 = { path = "../.."}
3132
anyhow = "1.0"
3233
glam = "0.27"

contrib/screen-13-fx/src/image_loader.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
use {
2-
super::BitmapFont, anyhow::Context, bmfont::BMFont, inline_spirv::include_spirv,
2+
super::BitmapFont, anyhow::Context, bmfont::BMFont, inline_spirv::include_spirv, log::info,
33
screen_13::prelude::*, std::sync::Arc,
44
};
55

6+
#[cfg(debug_assertions)]
7+
use log::warn;
8+
69
fn align_up_u32(val: u32, atom: u32) -> u32 {
710
(val + atom - 1) & !(atom - 1)
811
}

contrib/screen-13-fx/src/transition.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use {
66
inline_spirv::include_spirv,
7+
log::trace,
78
screen_13::prelude::*,
89
std::{collections::HashMap, sync::Arc},
910
};

0 commit comments

Comments
 (0)