diff --git a/Cargo.toml b/Cargo.toml index 6d75e62..7e84718 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ documentation = "https://docs.rs/wgpu_glyph" readme = "README.md" [dependencies] -wgpu = "26" +wgpu = "28" glyph_brush = "0.7" log = "0.4" diff --git a/examples/clipping.rs b/examples/clipping.rs index 7ce0704..46b0c11 100644 --- a/examples/clipping.rs +++ b/examples/clipping.rs @@ -34,7 +34,7 @@ fn main() -> Result<(), Box> { }); // Create staging belt - let mut staging_belt = wgpu::util::StagingBelt::new(1024); + let mut staging_belt = wgpu::util::StagingBelt::new(device.clone(), 1024); // Prepare swap chain let render_format = wgpu::TextureFormat::Bgra8UnormSrgb; @@ -136,6 +136,7 @@ fn main() -> Result<(), Box> { depth_stencil_attachment: None, timestamp_writes: None, occlusion_query_set: None, + multiview_mask: None, }, ); } diff --git a/examples/depth.rs b/examples/depth.rs index 2456a2a..0b6af88 100644 --- a/examples/depth.rs +++ b/examples/depth.rs @@ -36,7 +36,7 @@ fn main() -> Result<(), Box> { }); // Create staging belt - let mut staging_belt = wgpu::util::StagingBelt::new(1024); + let mut staging_belt = wgpu::util::StagingBelt::new(device.clone(), 1024); // Prepare swap chain and depth buffer let mut size = window.inner_size(); @@ -125,6 +125,7 @@ fn main() -> Result<(), Box> { depth_stencil_attachment: None, timestamp_writes: None, occlusion_query_set: None, + multiview_mask: None, }, ); } diff --git a/examples/hello.rs b/examples/hello.rs index cdb02a1..92a9826 100644 --- a/examples/hello.rs +++ b/examples/hello.rs @@ -34,7 +34,7 @@ fn main() -> Result<(), Box> { }); // Create staging belt - let mut staging_belt = wgpu::util::StagingBelt::new(1024); + let mut staging_belt = wgpu::util::StagingBelt::new(device.clone(), 1024); // Prepare swap chain let render_format = wgpu::TextureFormat::Bgra8UnormSrgb; @@ -136,6 +136,7 @@ fn main() -> Result<(), Box> { depth_stencil_attachment: None, timestamp_writes: None, occlusion_query_set: None, + multiview_mask: None, }, ); } diff --git a/src/lib.rs b/src/lib.rs index 0a36598..a8da205 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -283,7 +283,6 @@ impl GlyphBrush<(), F, H> { ) -> Result<(), String> { self.process_queued(device, staging_belt, encoder); self.pipeline.draw( - device, staging_belt, encoder, target, @@ -317,7 +316,6 @@ impl GlyphBrush<(), F, H> { ) -> Result<(), String> { self.process_queued(device, staging_belt, encoder); self.pipeline.draw( - device, staging_belt, encoder, target, @@ -408,7 +406,6 @@ impl GlyphBrush { ) -> Result<(), String> { self.process_queued(device, staging_belt, encoder); self.pipeline.draw( - device, staging_belt, encoder, target, @@ -445,7 +442,6 @@ impl GlyphBrush { self.process_queued(device, staging_belt, encoder); self.pipeline.draw( - device, staging_belt, encoder, target, diff --git a/src/pipeline.rs b/src/pipeline.rs index c3fd35c..033a8bd 100644 --- a/src/pipeline.rs +++ b/src/pipeline.rs @@ -45,7 +45,6 @@ impl Pipeline<()> { pub fn draw( &mut self, - device: &wgpu::Device, staging_belt: &mut wgpu::util::StagingBelt, encoder: &mut wgpu::CommandEncoder, target: &wgpu::TextureView, @@ -54,7 +53,6 @@ impl Pipeline<()> { ) { draw( self, - device, staging_belt, encoder, target, @@ -88,7 +86,6 @@ impl Pipeline { pub fn draw( &mut self, - device: &wgpu::Device, staging_belt: &mut wgpu::util::StagingBelt, encoder: &mut wgpu::CommandEncoder, target: &wgpu::TextureView, @@ -98,7 +95,6 @@ impl Pipeline { ) { draw( self, - device, staging_belt, encoder, target, @@ -173,7 +169,6 @@ impl Pipeline { &self.instances, 0, size, - device, ); instances_view.copy_from_slice(instances_bytes); @@ -216,7 +211,7 @@ fn build( address_mode_w: wgpu::AddressMode::ClampToEdge, mag_filter: filter_mode, min_filter: filter_mode, - mipmap_filter: filter_mode, + mipmap_filter: wgpu::MipmapFilterMode::Nearest, ..Default::default() }); @@ -280,7 +275,7 @@ fn build( let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor { label: None, - push_constant_ranges: &[], + immediate_size: 0, bind_group_layouts: &[&uniform_layout], }); @@ -340,7 +335,7 @@ fn build( })], compilation_options: wgpu::PipelineCompilationOptions::default(), }), - multiview: None, + multiview_mask: None, }); Pipeline { @@ -360,7 +355,6 @@ fn build( fn draw( pipeline: &mut Pipeline, - device: &wgpu::Device, staging_belt: &mut wgpu::util::StagingBelt, encoder: &mut wgpu::CommandEncoder, target: &wgpu::TextureView, @@ -374,7 +368,6 @@ fn draw( &pipeline.transform, 0, unsafe { NonZeroU64::new_unchecked(16 * 4) }, - device, ); transform_view.copy_from_slice(bytemuck::cast_slice(&transform)); @@ -397,6 +390,7 @@ fn draw( depth_stencil_attachment, timestamp_writes: None, occlusion_query_set: None, + multiview_mask: None, }); render_pass.set_pipeline(&pipeline.raw); diff --git a/src/pipeline/cache.rs b/src/pipeline/cache.rs index 0165e9c..12e81b1 100644 --- a/src/pipeline/cache.rs +++ b/src/pipeline/cache.rs @@ -85,7 +85,6 @@ impl Cache { &self.upload_buffer, 0, NonZeroU64::new(padded_data_size).unwrap(), - device, ); for row in 0..height {