diff --git a/Cargo.toml b/Cargo.toml index f6368a5..84193fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/grovesNL/glyphon" license = "MIT OR Apache-2.0 OR Zlib" [dependencies] -wgpu = "0.14.0" +wgpu = "0.15" etagere = "0.2.6" cosmic-text = "0.8" lru = "0.9" diff --git a/examples/hello-world.rs b/examples/hello-world.rs index 3c5c6fd..782ceed 100644 --- a/examples/hello-world.rs +++ b/examples/hello-world.rs @@ -3,10 +3,10 @@ use glyphon::{ TextBounds, TextRenderer, }; use wgpu::{ - Backends, CommandEncoderDescriptor, CompositeAlphaMode, DeviceDescriptor, Features, Instance, - Limits, LoadOp, MultisampleState, Operations, PresentMode, RenderPassColorAttachment, - RenderPassDescriptor, RequestAdapterOptions, SurfaceConfiguration, TextureFormat, - TextureUsages, TextureViewDescriptor, + CommandEncoderDescriptor, CompositeAlphaMode, DeviceDescriptor, Features, Instance, + InstanceDescriptor, Limits, LoadOp, MultisampleState, Operations, PresentMode, + RenderPassColorAttachment, RenderPassDescriptor, RequestAdapterOptions, SurfaceConfiguration, + TextureFormat, TextureUsages, TextureViewDescriptor, }; use winit::{ dpi::LogicalSize, @@ -32,7 +32,7 @@ async fn run() { let scale_factor = window.scale_factor(); // Set up surface - let instance = Instance::new(Backends::all()); + let instance = Instance::new(InstanceDescriptor::default()); let adapter = instance .request_adapter(&RequestAdapterOptions::default()) .await @@ -48,7 +48,7 @@ async fn run() { ) .await .unwrap(); - let surface = unsafe { instance.create_surface(&window) }; + let surface = unsafe { instance.create_surface(&window) }.expect("Create surface"); let swapchain_format = TextureFormat::Bgra8UnormSrgb; let mut config = SurfaceConfiguration { usage: TextureUsages::RENDER_ATTACHMENT, @@ -57,6 +57,7 @@ async fn run() { height: size.height, present_mode: PresentMode::Fifo, alpha_mode: CompositeAlphaMode::Opaque, + view_formats: vec![], }; surface.configure(&device, &config); diff --git a/src/text_atlas.rs b/src/text_atlas.rs index 777f6d9..0a1d159 100644 --- a/src/text_atlas.rs +++ b/src/text_atlas.rs @@ -49,6 +49,7 @@ impl InnerAtlas { _ => panic!("unexpected number of channels"), }, usage: TextureUsages::TEXTURE_BINDING | TextureUsages::COPY_DST, + view_formats: &[], }); let texture_view = texture.create_view(&TextureViewDescriptor::default());