Upgrade WGPU and Linebender dependencies (#4154)

This commit is contained in:
Timon
2026-05-17 15:00:32 +00:00
parent c4a978009a
commit d5f0140f26
23 changed files with 414 additions and 399 deletions

View File

@@ -113,7 +113,10 @@ impl CanvasSurface for CanvasSurfaceHandle {
},
);
let surface_texture = surface.get_current_texture().expect("Failed to get surface texture");
let surface_texture = match surface.get_current_texture() {
wgpu::CurrentSurfaceTexture::Success(t) | wgpu::CurrentSurfaceTexture::Suboptimal(t) => t,
other => panic!("Failed to get surface texture: {other:?}"),
};
encoder.copy_texture_to_texture(
wgpu::TexelCopyTextureInfoBase {

View File

@@ -33,13 +33,13 @@ impl BackgroundCompositor {
let checker_rect_pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("background_checker_rect_pipeline_layout"),
bind_group_layouts: &[&checker_bind_group_layout],
bind_group_layouts: &[Some(&checker_bind_group_layout)],
immediate_size: 0,
});
let checker_viewport_pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("background_checker_viewport_pipeline_layout"),
bind_group_layouts: &[&checker_bind_group_layout],
bind_group_layouts: &[Some(&checker_bind_group_layout)],
immediate_size: 0,
});
@@ -67,7 +67,7 @@ impl BackgroundCompositor {
let fullscreen_pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("background_fullscreen_pipeline_layout"),
bind_group_layouts: &[&fullscreen_bind_group_layout],
bind_group_layouts: &[Some(&fullscreen_bind_group_layout)],
immediate_size: 0,
});

View File

@@ -68,9 +68,9 @@ impl ContextBuilder {
}
impl ContextBuilder {
fn build_instance(&self) -> Instance {
Instance::new(&wgpu::InstanceDescriptor {
Instance::new(wgpu::InstanceDescriptor {
backends: self.backends,
..Default::default()
..wgpu::InstanceDescriptor::new_without_display_handle()
})
}
async fn request_adapter(&self, instance: &Instance) -> Option<Adapter> {

View File

@@ -38,7 +38,7 @@ impl Resampler {
let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("resample_pipeline_layout"),
bind_group_layouts: &[&bind_group_layout],
bind_group_layouts: &[Some(&bind_group_layout)],
..Default::default()
});

View File

@@ -113,10 +113,10 @@ impl PerPixelAdjustGraphicsPipeline {
};
let pipeline_layout = device.create_pipeline_layout(&PipelineLayoutDescriptor {
label: Some(&format!("PerPixelAdjust {name} PipelineLayout")),
bind_group_layouts: &[&device.create_bind_group_layout(&BindGroupLayoutDescriptor {
bind_group_layouts: &[Some(&device.create_bind_group_layout(&BindGroupLayoutDescriptor {
label: Some(&format!("PerPixelAdjust {name} BindGroupLayout 0")),
entries,
})],
}))],
..Default::default()
});