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

Wgpu 0.16 #1807

Merged
merged 4 commits into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 1 addition & 2 deletions examples/integration_wgpu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
backends: backend,
..Default::default()
});

let surface = unsafe { instance.create_surface(&window) }?;

let (format, (device, queue)) = futures::executor::block_on(async {
Expand All @@ -99,8 +98,8 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
capabilities
.formats
.iter()
.filter(|format| format.describe().srgb)
.copied()
.filter(wgpu::TextureFormat::is_srgb)
.next()
.or_else(|| capabilities.formats.first().copied())
.expect("Get preferred format"),
Expand Down
4 changes: 2 additions & 2 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ spirv = ["wgpu/spirv"]
webgl = ["wgpu/webgl"]

[dependencies]
wgpu = "0.15"
wgpu_glyph = "0.19"
wgpu = "0.16"
wgpu_glyph = "0.20"
glyph_brush = "0.7"
raw-window-handle = "0.5"
log = "0.4"
Expand Down
6 changes: 2 additions & 4 deletions wgpu/src/image/atlas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ pub const SIZE: u32 = 2048;
use iced_graphics::image;
use iced_graphics::Size;

use std::num::NonZeroU32;

#[derive(Debug)]
pub struct Atlas {
texture: wgpu::Texture,
Expand Down Expand Up @@ -209,8 +207,8 @@ impl Atlas {
buffer,
layout: wgpu::ImageDataLayout {
offset: offset as u64,
bytes_per_row: NonZeroU32::new(4 * image_width + padding),
rows_per_image: NonZeroU32::new(image_height),
bytes_per_row: Some(4 * image_width + padding),
rows_per_image: Some(image_height),
},
},
wgpu::ImageCopyTexture {
Expand Down
2 changes: 1 addition & 1 deletion wgpu/src/window/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ impl<Theme> Compositor<Theme> {
capabilities
.formats
.iter()
.filter(|format| format.describe().srgb)
.copied()
.filter(wgpu::TextureFormat::is_srgb)
.next()
.or_else(|| {
log::warn!("No sRGB format found!");
Expand Down