Update dependencies (#337)

Breaking changes:

- Updates `wgpu` to 0.16
This commit is contained in:
Jay Oster 2023-06-11 21:25:25 -07:00 committed by GitHub
parent cbda7df53b
commit 3891192796
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 558 additions and 669 deletions

1118
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -24,17 +24,17 @@ bytemuck = "1.12"
raw-window-handle = "0.5"
thiserror = "1.0"
ultraviolet = "0.9"
wgpu = "0.15"
wgpu = "0.16"
[target.'cfg(target_arch = "wasm32")'.dependencies]
wgpu = { version = "0.15", features = ["webgl"] }
wgpu = { version = "0.16", features = ["webgl"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
pollster = "0.2"
pollster = "0.3"
[dev-dependencies]
pixels-mocks = { path = "internals/pixels-mocks" }
winit = "0.27"
winit = "0.28"
[workspace]
members = [

View file

@ -18,5 +18,5 @@ line_drawing = "1"
log = "0.4"
pixels = { path = "../.." }
randomize = "3"
winit = "0.27"
winit_input_helper = "0.13"
winit = "0.28"
winit_input_helper = "0.14"

View file

@ -57,7 +57,7 @@ fn main() -> Result<(), Error> {
// It returns `true` when it is time to update our game state and request a redraw.
if input.update(&event) {
// Close events
if input.key_pressed(VirtualKeyCode::Escape) || input.quit() {
if input.key_pressed(VirtualKeyCode::Escape) || input.close_requested() {
*control_flow = ControlFlow::Exit;
return;
}

View file

@ -15,5 +15,5 @@ env_logger = "0.10"
error-iter = "0.4"
log = "0.4"
pixels = { path = "../.." }
winit = "0.27"
winit_input_helper = "0.13"
winit = "0.28"
winit_input_helper = "0.14"

View file

@ -75,7 +75,7 @@ fn main() -> Result<(), Error> {
// Handle input events
if input.update(&event) {
// Close events
if input.key_pressed(VirtualKeyCode::Escape) || input.quit() {
if input.key_pressed(VirtualKeyCode::Escape) || input.close_requested() {
*control_flow = ControlFlow::Exit;
return;
}

View file

@ -40,7 +40,7 @@ impl NoiseRenderer {
lod_min_clamp: 0.0,
lod_max_clamp: 1.0,
compare: None,
anisotropy_clamp: None,
anisotropy_clamp: 1,
border_color: None,
});

View file

@ -12,14 +12,14 @@ default = ["optimize"]
[dependencies]
env_logger = "0.10"
error-iter = "0.4"
imgui = "0.10"
# imgui-wgpu = "0.21"
imgui-winit-support = "0.10"
imgui = "0.11"
# imgui-wgpu = "0.22"
imgui-winit-support = "0.11"
log = "0.4"
pixels = { path = "../.." }
winit = "0.27"
winit_input_helper = "0.13"
[dependencies.imgui-wgpu]
git = "https://github.com/Yatekii/imgui-wgpu-rs.git"
rev = "1355ebf8181bc51aea4dbd2009ea124f5da90542"
git = "https://github.com/Nelarius/imgui-wgpu-rs.git"
rev = "1cd675a79a605835c1ea996d68a943cd3c3b4af9"

View file

@ -13,11 +13,11 @@ default = ["optimize"]
byteorder = "1"
env_logger = "0.10"
error-iter = "0.4"
game-loop = { version = "=0.10.1", features = ["winit"] }
game-loop = { version = "0.10", features = ["winit"] }
getrandom = "0.2"
gilrs = "0.10"
log = "0.4"
pixels = { path = "../.." }
simple-invaders = { path = "simple-invaders" }
winit = "0.27"
winit_input_helper = "0.13"
winit = "0.28"
winit_input_helper = "0.14"

View file

@ -164,7 +164,9 @@ fn main() -> Result<(), Error> {
g.game.update_controls();
// Close events
if g.game.input.key_pressed(VirtualKeyCode::Escape) || g.game.input.quit() {
if g.game.input.key_pressed(VirtualKeyCode::Escape)
|| g.game.input.close_requested()
{
g.exit();
return;
}

View file

@ -10,24 +10,12 @@ optimize = ["log/release_max_level_warn"]
default = ["optimize"]
[dependencies]
# egui = "0.20"
# egui-wgpu = "0.20"
# egui-winit = { version = "0.20", default-features = false, features = ["links"] }
egui = "0.22"
egui-wgpu = "0.22"
egui-winit = { version = "0.22", default-features = false, features = ["links"] }
env_logger = "0.10"
error-iter = "0.4"
log = "0.4"
pixels = { path = "../.." }
winit = "0.27"
winit_input_helper = "0.13"
[dependencies.egui]
git = "https://github.com/emilk/egui.git"
rev = "f222ee044edf8beebfaf5dd7be15c9f318f20886"
[dependencies.egui-wgpu]
git = "https://github.com/emilk/egui.git"
rev = "f222ee044edf8beebfaf5dd7be15c9f318f20886"
[dependencies.egui-winit]
git = "https://github.com/emilk/egui.git"
rev = "f222ee044edf8beebfaf5dd7be15c9f318f20886"
winit = "0.28"
winit_input_helper = "0.14"

View file

@ -60,7 +60,7 @@ fn main() -> Result<(), Error> {
// Handle input events
if input.update(&event) {
// Close events
if input.key_pressed(VirtualKeyCode::Escape) || input.quit() {
if input.key_pressed(VirtualKeyCode::Escape) || input.close_requested() {
*control_flow = ControlFlow::Exit;
return;
}

View file

@ -14,4 +14,4 @@ env_logger = "0.10"
error-iter = "0.4"
log = "0.4"
pixels = { path = "../.." }
tao = "0.17"
tao = "0.20"

View file

@ -13,16 +13,16 @@ default = ["optimize"]
error-iter = "0.4"
log = "0.4"
pixels = { path = "../.." }
winit = "0.27"
winit_input_helper = "0.13"
winit = "0.28"
winit_input_helper = "0.14"
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
console_log = "0.2"
console_log = "1"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = ["GpuTextureFormat"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
env_logger = "0.10"
pollster = "0.2"
pollster = "0.3"

View file

@ -122,7 +122,7 @@ async fn run() {
// Handle input events
if input.update(&event) {
// Close events
if input.key_pressed(VirtualKeyCode::Escape) || input.quit() {
if input.key_pressed(VirtualKeyCode::Escape) || input.close_requested() {
*control_flow = ControlFlow::Exit;
return;
}

View file

@ -14,5 +14,5 @@ env_logger = "0.10"
error-iter = "0.4"
log = "0.4"
pixels = { path = "../.." }
winit = "0.27"
winit_input_helper = "0.13"
winit = "0.28"
winit_input_helper = "0.14"

View file

@ -57,7 +57,7 @@ fn main() -> Result<(), Error> {
// Handle input events
if input.update(&event) {
// Close events
if input.key_pressed(VirtualKeyCode::Escape) || input.quit() {
if input.key_pressed(VirtualKeyCode::Escape) || input.close_requested() {
*control_flow = ControlFlow::Exit;
return;
}

View file

@ -16,5 +16,5 @@ euclid = "0.22"
log = "0.4"
pixels = { path = "../.." }
raqote = { version = "0.8", default-features = false }
winit = "0.27"
winit_input_helper = "0.13"
winit = "0.28"
winit_input_helper = "0.14"

View file

@ -67,7 +67,7 @@ fn main() -> Result<(), Error> {
// Handle input events
if input.update(&event) {
// Close events
if input.key_pressed(VirtualKeyCode::Escape) || input.quit() {
if input.key_pressed(VirtualKeyCode::Escape) || input.close_requested() {
*control_flow = ControlFlow::Exit;
return;
}

View file

@ -14,6 +14,6 @@ env_logger = "0.10"
error-iter = "0.4"
log = "0.4"
pixels = { path = "../.." }
winit = "0.27"
winit_input_helper = "0.13"
tiny-skia = "0.8"
tiny-skia = "0.11"
winit = "0.28"
winit_input_helper = "0.14"

View file

@ -55,7 +55,7 @@ fn main() -> Result<(), Error> {
// Handle input events
if input.update(&event) {
// Close events
if input.key_pressed(VirtualKeyCode::Escape) || input.quit() {
if input.key_pressed(VirtualKeyCode::Escape) || input.close_requested() {
*control_flow = ControlFlow::Exit;
return;
}

View file

@ -291,7 +291,7 @@ impl<'req, 'dev, 'win, W: HasRawWindowHandle + HasRawDisplayHandle>
*surface_capabilities
.formats
.iter()
.find(|format| format.describe().srgb)
.find(|format| format.is_srgb())
.unwrap_or(&wgpu::TextureFormat::Bgra8UnormSrgb)
});
let render_texture_format = self.render_texture_format.unwrap_or(surface_texture_format);
@ -578,7 +578,7 @@ const fn texture_format_size(texture_format: wgpu::TextureFormat) -> f32 {
| Bc5RgUnorm
| Bc5RgSnorm
| Bc6hRgbUfloat
| Bc6hRgbSfloat
| Bc6hRgbFloat
| Bc7RgbaUnorm
| Bc7RgbaUnormSrgb
| EacRg11Unorm

View file

@ -35,7 +35,6 @@ pub use crate::builder::{check_texture_size, PixelsBuilder};
pub use crate::renderers::ScalingRenderer;
pub use raw_window_handle;
use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};
use std::num::NonZeroU32;
use thiserror::Error;
pub use wgpu;
@ -494,8 +493,8 @@ impl Pixels {
&self.pixels,
wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: NonZeroU32::new(bytes_per_row),
rows_per_image: NonZeroU32::new(self.context.texture_extent.height),
bytes_per_row: Some(bytes_per_row),
rows_per_image: Some(self.context.texture_extent.height),
},
self.context.texture_extent,
);

View file

@ -40,7 +40,7 @@ impl ScalingRenderer {
lod_min_clamp: 0.0,
lod_max_clamp: 1.0,
compare: None,
anisotropy_clamp: None,
anisotropy_clamp: 1,
border_color: None,
});