Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dev deps #2493

Merged
merged 1 commit into from
Feb 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion player/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish = false
[features]

[dependencies]
env_logger = "0.8"
env_logger = "0.9"
log = "0.4"
raw-window-handle = "0.4"
ron = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ rev = "8e2e39e"
features = ["wgsl-in"]

[dev-dependencies]
env_logger = "0.8"
env_logger = "0.9"
winit = "0.26" # for "halmark" example

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion wgpu-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ keywords = ["graphics"]
license = "MIT OR Apache-2.0"

[dependencies]
env_logger = "0.8"
env_logger = "0.9"
wgpu = { version = "0.12", path = "../wgpu" }
6 changes: 3 additions & 3 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,20 @@ smallvec = "1"
bitflags = "1"
bytemuck = { version = "1.4", features = ["derive"] }
cgmath = "0.18"
ddsfile = "0.4"
ddsfile = "0.5"
log = "0.4"
# Opt out of noise's "default-features" to avoid "image" feature as a dependency count optimization.
# This will not be required in the next release since it has been removed from the default feature in https://github.com/Razaekel/noise-rs/commit/1af9e1522236b2c584fb9a02150c9c67a5e6bb04#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542
noise = { version = "0.7", default-features = false }
obj = "0.10"
png = "0.16"
png = "0.17"
rand = "0.7.2"
winit = "0.26"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
async-executor = "1.0"
pollster = "0.2"
env_logger = "0.8"
env_logger = "0.9"

[dependencies.naga]
git = "https://github.com/gfx-rs/naga"
Expand Down
6 changes: 3 additions & 3 deletions wgpu/examples/bunnymark/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ impl framework::Example for Example {
let texture = {
let img_data = include_bytes!("../../../logo.png");
let decoder = png::Decoder::new(std::io::Cursor::new(img_data));
let (info, mut reader) = decoder.read_info().unwrap();
let mut buf = vec![0; info.buffer_size()];
reader.next_frame(&mut buf).unwrap();
let mut reader = decoder.read_info().unwrap();
let mut buf = vec![0; reader.output_buffer_size()];
let info = reader.next_frame(&mut buf).unwrap();

let size = wgpu::Extent3d {
width: info.width,
Expand Down
5 changes: 3 additions & 2 deletions wgpu/examples/capture/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,12 @@ async fn create_png(
buffer_dimensions.height as u32,
);
png_encoder.set_depth(png::BitDepth::Eight);
png_encoder.set_color(png::ColorType::RGBA);
png_encoder.set_color(png::ColorType::Rgba);
let mut png_writer = png_encoder
.write_header()
.unwrap()
.into_stream_writer_with_size(buffer_dimensions.unpadded_bytes_per_row);
.into_stream_writer_with_size(buffer_dimensions.unpadded_bytes_per_row)
.unwrap();

// from the padded_buffer we write just the unpadded bytes into the image
for chunk in padded_buffer.chunks(buffer_dimensions.padded_bytes_per_row) {
Expand Down
12 changes: 6 additions & 6 deletions wgpu/tests/common/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ fn read_png(path: impl AsRef<Path>, width: u32, height: u32) -> Option<Vec<u8>>
}
};
let decoder = png::Decoder::new(Cursor::new(data));
let (info, mut reader) = decoder.read_info().ok()?;
let mut reader = decoder.read_info().ok()?;

let mut buffer = vec![0; reader.output_buffer_size()];
let info = reader.next_frame(&mut buffer).ok()?;
if info.width != width {
log::warn!("image comparison invalid: size mismatch");
return None;
Expand All @@ -28,7 +31,7 @@ fn read_png(path: impl AsRef<Path>, width: u32, height: u32) -> Option<Vec<u8>>
log::warn!("image comparison invalid: size mismatch");
return None;
}
if info.color_type != png::ColorType::RGBA {
if info.color_type != png::ColorType::Rgba {
log::warn!("image comparison invalid: color type mismatch");
return None;
}
Expand All @@ -37,9 +40,6 @@ fn read_png(path: impl AsRef<Path>, width: u32, height: u32) -> Option<Vec<u8>>
return None;
}

let mut buffer = vec![0; info.buffer_size()];
reader.next_frame(&mut buffer).ok()?;

Some(buffer)
}

Expand All @@ -53,7 +53,7 @@ fn write_png(
let file = BufWriter::new(File::create(path).unwrap());

let mut encoder = png::Encoder::new(file, width, height);
encoder.set_color(png::ColorType::RGBA);
encoder.set_color(png::ColorType::Rgba);
encoder.set_depth(png::BitDepth::Eight);
encoder.set_compression(compression);
let mut writer = encoder.write_header().unwrap();
Expand Down