mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Upgrade WGPU and Linebender dependencies (#4154)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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()
|
||||
});
|
||||
|
||||
|
||||
@@ -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()
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user