Merge pull request #2510 from iced-rs/wgpu-22.0
Update `wgpu` to `22.0`
This commit is contained in:
commit
b78b8bc8e3
14 changed files with 63 additions and 2 deletions
|
|
@ -65,6 +65,8 @@ advanced = ["iced_core/advanced", "iced_widget/advanced"]
|
||||||
fira-sans = ["iced_renderer/fira-sans"]
|
fira-sans = ["iced_renderer/fira-sans"]
|
||||||
# Enables auto-detecting light/dark mode for the built-in theme
|
# Enables auto-detecting light/dark mode for the built-in theme
|
||||||
auto-detect-theme = ["iced_core/auto-detect-theme"]
|
auto-detect-theme = ["iced_core/auto-detect-theme"]
|
||||||
|
# Enables strict assertions for debugging purposes at the expense of performance
|
||||||
|
strict-assertions = ["iced_renderer/strict-assertions"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced_core.workspace = true
|
iced_core.workspace = true
|
||||||
|
|
@ -148,7 +150,7 @@ cosmic-text = "0.12"
|
||||||
dark-light = "1.0"
|
dark-light = "1.0"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
glam = "0.25"
|
glam = "0.25"
|
||||||
glyphon = { git = "https://github.com/hecrj/glyphon.git", rev = "feef9f5630c2adb3528937e55f7bfad2da561a65" }
|
glyphon = { git = "https://github.com/hecrj/glyphon.git", rev = "0d7ba1bba4dd71eb88d2cface5ce649db2413cb7" }
|
||||||
guillotiere = "0.6"
|
guillotiere = "0.6"
|
||||||
half = "2.2"
|
half = "2.2"
|
||||||
image = { version = "0.24", default-features = false }
|
image = { version = "0.24", default-features = false }
|
||||||
|
|
@ -181,7 +183,7 @@ wasm-bindgen-futures = "0.4"
|
||||||
wasm-timer = "0.2"
|
wasm-timer = "0.2"
|
||||||
web-sys = "0.3.69"
|
web-sys = "0.3.69"
|
||||||
web-time = "1.1"
|
web-time = "1.1"
|
||||||
wgpu = "0.19"
|
wgpu = "22.0"
|
||||||
winapi = "0.3"
|
winapi = "0.3"
|
||||||
window_clipboard = "0.4.1"
|
window_clipboard = "0.4.1"
|
||||||
winit = { git = "https://github.com/iced-rs/winit.git", rev = "254d6b3420ce4e674f516f7a2bd440665e05484d" }
|
winit = { git = "https://github.com/iced-rs/winit.git", rev = "254d6b3420ce4e674f516f7a2bd440665e05484d" }
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ fn benchmark<'a>(
|
||||||
label: None,
|
label: None,
|
||||||
required_features: wgpu::Features::empty(),
|
required_features: wgpu::Features::empty(),
|
||||||
required_limits: wgpu::Limits::default(),
|
required_limits: wgpu::Limits::default(),
|
||||||
|
memory_hints: wgpu::MemoryHints::MemoryUsage,
|
||||||
},
|
},
|
||||||
None,
|
None,
|
||||||
))
|
))
|
||||||
|
|
|
||||||
|
|
@ -243,6 +243,8 @@ impl Pipeline {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
entry_point: "vs_main",
|
entry_point: "vs_main",
|
||||||
buffers: &[Vertex::desc(), cube::Raw::desc()],
|
buffers: &[Vertex::desc(), cube::Raw::desc()],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
},
|
},
|
||||||
primitive: wgpu::PrimitiveState::default(),
|
primitive: wgpu::PrimitiveState::default(),
|
||||||
depth_stencil: Some(wgpu::DepthStencilState {
|
depth_stencil: Some(wgpu::DepthStencilState {
|
||||||
|
|
@ -276,8 +278,11 @@ impl Pipeline {
|
||||||
}),
|
}),
|
||||||
write_mask: wgpu::ColorWrites::ALL,
|
write_mask: wgpu::ColorWrites::ALL,
|
||||||
})],
|
})],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
}),
|
}),
|
||||||
multiview: None,
|
multiview: None,
|
||||||
|
cache: None,
|
||||||
});
|
});
|
||||||
|
|
||||||
let depth_pipeline = DepthPipeline::new(
|
let depth_pipeline = DepthPipeline::new(
|
||||||
|
|
@ -490,6 +495,8 @@ impl DepthPipeline {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
entry_point: "vs_main",
|
entry_point: "vs_main",
|
||||||
buffers: &[],
|
buffers: &[],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
},
|
},
|
||||||
primitive: wgpu::PrimitiveState::default(),
|
primitive: wgpu::PrimitiveState::default(),
|
||||||
depth_stencil: Some(wgpu::DepthStencilState {
|
depth_stencil: Some(wgpu::DepthStencilState {
|
||||||
|
|
@ -508,8 +515,11 @@ impl DepthPipeline {
|
||||||
blend: Some(wgpu::BlendState::REPLACE),
|
blend: Some(wgpu::BlendState::REPLACE),
|
||||||
write_mask: wgpu::ColorWrites::ALL,
|
write_mask: wgpu::ColorWrites::ALL,
|
||||||
})],
|
})],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
}),
|
}),
|
||||||
multiview: None,
|
multiview: None,
|
||||||
|
cache: None,
|
||||||
});
|
});
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,8 @@ pub fn main() -> Result<(), winit::error::EventLoopError> {
|
||||||
required_features: adapter_features
|
required_features: adapter_features
|
||||||
& wgpu::Features::default(),
|
& wgpu::Features::default(),
|
||||||
required_limits: wgpu::Limits::default(),
|
required_limits: wgpu::Limits::default(),
|
||||||
|
memory_hints:
|
||||||
|
wgpu::MemoryHints::MemoryUsage,
|
||||||
},
|
},
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ fn build_pipeline(
|
||||||
module: &vs_module,
|
module: &vs_module,
|
||||||
entry_point: "main",
|
entry_point: "main",
|
||||||
buffers: &[],
|
buffers: &[],
|
||||||
|
compilation_options: wgpu::PipelineCompilationOptions::default(),
|
||||||
},
|
},
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
module: &fs_module,
|
module: &fs_module,
|
||||||
|
|
@ -86,6 +87,7 @@ fn build_pipeline(
|
||||||
}),
|
}),
|
||||||
write_mask: wgpu::ColorWrites::ALL,
|
write_mask: wgpu::ColorWrites::ALL,
|
||||||
})],
|
})],
|
||||||
|
compilation_options: wgpu::PipelineCompilationOptions::default(),
|
||||||
}),
|
}),
|
||||||
primitive: wgpu::PrimitiveState {
|
primitive: wgpu::PrimitiveState {
|
||||||
topology: wgpu::PrimitiveTopology::TriangleList,
|
topology: wgpu::PrimitiveTopology::TriangleList,
|
||||||
|
|
@ -99,5 +101,6 @@ fn build_pipeline(
|
||||||
alpha_to_coverage_enabled: false,
|
alpha_to_coverage_enabled: false,
|
||||||
},
|
},
|
||||||
multiview: None,
|
multiview: None,
|
||||||
|
cache: None,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ geometry = ["iced_graphics/geometry", "iced_tiny_skia?/geometry", "iced_wgpu?/ge
|
||||||
web-colors = ["iced_wgpu?/web-colors"]
|
web-colors = ["iced_wgpu?/web-colors"]
|
||||||
webgl = ["iced_wgpu?/webgl"]
|
webgl = ["iced_wgpu?/webgl"]
|
||||||
fira-sans = ["iced_graphics/fira-sans"]
|
fira-sans = ["iced_graphics/fira-sans"]
|
||||||
|
strict-assertions = ["iced_wgpu?/strict-assertions"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced_graphics.workspace = true
|
iced_graphics.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ image = ["iced_graphics/image"]
|
||||||
svg = ["iced_graphics/svg", "resvg/text"]
|
svg = ["iced_graphics/svg", "resvg/text"]
|
||||||
web-colors = ["iced_graphics/web-colors"]
|
web-colors = ["iced_graphics/web-colors"]
|
||||||
webgl = ["wgpu/webgl"]
|
webgl = ["wgpu/webgl"]
|
||||||
|
strict-assertions = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced_graphics.workspace = true
|
iced_graphics.workspace = true
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,8 @@ pub fn convert(
|
||||||
module: &shader,
|
module: &shader,
|
||||||
entry_point: "vs_main",
|
entry_point: "vs_main",
|
||||||
buffers: &[],
|
buffers: &[],
|
||||||
|
compilation_options: wgpu::PipelineCompilationOptions::default(
|
||||||
|
),
|
||||||
},
|
},
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
|
|
@ -130,6 +132,8 @@ pub fn convert(
|
||||||
}),
|
}),
|
||||||
write_mask: wgpu::ColorWrites::ALL,
|
write_mask: wgpu::ColorWrites::ALL,
|
||||||
})],
|
})],
|
||||||
|
compilation_options: wgpu::PipelineCompilationOptions::default(
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
primitive: wgpu::PrimitiveState {
|
primitive: wgpu::PrimitiveState {
|
||||||
topology: wgpu::PrimitiveTopology::TriangleList,
|
topology: wgpu::PrimitiveTopology::TriangleList,
|
||||||
|
|
@ -139,6 +143,7 @@ pub fn convert(
|
||||||
depth_stencil: None,
|
depth_stencil: None,
|
||||||
multisample: wgpu::MultisampleState::default(),
|
multisample: wgpu::MultisampleState::default(),
|
||||||
multiview: None,
|
multiview: None,
|
||||||
|
cache: None,
|
||||||
});
|
});
|
||||||
|
|
||||||
let texture = device.create_texture(&wgpu::TextureDescriptor {
|
let texture = device.create_texture(&wgpu::TextureDescriptor {
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,8 @@ impl Pipeline {
|
||||||
8 => Uint32,
|
8 => Uint32,
|
||||||
),
|
),
|
||||||
}],
|
}],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
},
|
},
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
|
|
@ -173,6 +175,8 @@ impl Pipeline {
|
||||||
}),
|
}),
|
||||||
write_mask: wgpu::ColorWrites::ALL,
|
write_mask: wgpu::ColorWrites::ALL,
|
||||||
})],
|
})],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
}),
|
}),
|
||||||
primitive: wgpu::PrimitiveState {
|
primitive: wgpu::PrimitiveState {
|
||||||
topology: wgpu::PrimitiveTopology::TriangleList,
|
topology: wgpu::PrimitiveTopology::TriangleList,
|
||||||
|
|
@ -186,6 +190,7 @@ impl Pipeline {
|
||||||
alpha_to_coverage_enabled: false,
|
alpha_to_coverage_enabled: false,
|
||||||
},
|
},
|
||||||
multiview: None,
|
multiview: None,
|
||||||
|
cache: None,
|
||||||
});
|
});
|
||||||
|
|
||||||
Pipeline {
|
Pipeline {
|
||||||
|
|
|
||||||
|
|
@ -152,11 +152,15 @@ impl Pipeline {
|
||||||
9 => Float32
|
9 => Float32
|
||||||
),
|
),
|
||||||
}],
|
}],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
},
|
},
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
entry_point: "gradient_fs_main",
|
entry_point: "gradient_fs_main",
|
||||||
targets: &quad::color_target_state(format),
|
targets: &quad::color_target_state(format),
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
}),
|
}),
|
||||||
primitive: wgpu::PrimitiveState {
|
primitive: wgpu::PrimitiveState {
|
||||||
topology: wgpu::PrimitiveTopology::TriangleList,
|
topology: wgpu::PrimitiveTopology::TriangleList,
|
||||||
|
|
@ -170,6 +174,7 @@ impl Pipeline {
|
||||||
alpha_to_coverage_enabled: false,
|
alpha_to_coverage_enabled: false,
|
||||||
},
|
},
|
||||||
multiview: None,
|
multiview: None,
|
||||||
|
cache: None,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,11 +114,15 @@ impl Pipeline {
|
||||||
8 => Float32,
|
8 => Float32,
|
||||||
),
|
),
|
||||||
}],
|
}],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
},
|
},
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
entry_point: "solid_fs_main",
|
entry_point: "solid_fs_main",
|
||||||
targets: &quad::color_target_state(format),
|
targets: &quad::color_target_state(format),
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
}),
|
}),
|
||||||
primitive: wgpu::PrimitiveState {
|
primitive: wgpu::PrimitiveState {
|
||||||
topology: wgpu::PrimitiveTopology::TriangleList,
|
topology: wgpu::PrimitiveTopology::TriangleList,
|
||||||
|
|
@ -132,6 +136,7 @@ impl Pipeline {
|
||||||
alpha_to_coverage_enabled: false,
|
alpha_to_coverage_enabled: false,
|
||||||
},
|
},
|
||||||
multiview: None,
|
multiview: None,
|
||||||
|
cache: None,
|
||||||
});
|
});
|
||||||
|
|
||||||
Self { pipeline }
|
Self { pipeline }
|
||||||
|
|
|
||||||
|
|
@ -760,16 +760,21 @@ mod solid {
|
||||||
1 => Float32x4,
|
1 => Float32x4,
|
||||||
),
|
),
|
||||||
}],
|
}],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
},
|
},
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
entry_point: "solid_fs_main",
|
entry_point: "solid_fs_main",
|
||||||
targets: &[Some(triangle::fragment_target(format))],
|
targets: &[Some(triangle::fragment_target(format))],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
}),
|
}),
|
||||||
primitive: triangle::primitive_state(),
|
primitive: triangle::primitive_state(),
|
||||||
depth_stencil: None,
|
depth_stencil: None,
|
||||||
multisample: triangle::multisample_state(antialiasing),
|
multisample: triangle::multisample_state(antialiasing),
|
||||||
multiview: None,
|
multiview: None,
|
||||||
|
cache: None,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -937,16 +942,21 @@ mod gradient {
|
||||||
6 => Float32x4
|
6 => Float32x4
|
||||||
),
|
),
|
||||||
}],
|
}],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
},
|
},
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
entry_point: "gradient_fs_main",
|
entry_point: "gradient_fs_main",
|
||||||
targets: &[Some(triangle::fragment_target(format))],
|
targets: &[Some(triangle::fragment_target(format))],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
}),
|
}),
|
||||||
primitive: triangle::primitive_state(),
|
primitive: triangle::primitive_state(),
|
||||||
depth_stencil: None,
|
depth_stencil: None,
|
||||||
multisample: triangle::multisample_state(antialiasing),
|
multisample: triangle::multisample_state(antialiasing),
|
||||||
multiview: None,
|
multiview: None,
|
||||||
|
cache: None,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,8 @@ impl Blit {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
entry_point: "vs_main",
|
entry_point: "vs_main",
|
||||||
buffers: &[],
|
buffers: &[],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
},
|
},
|
||||||
fragment: Some(wgpu::FragmentState {
|
fragment: Some(wgpu::FragmentState {
|
||||||
module: &shader,
|
module: &shader,
|
||||||
|
|
@ -123,6 +125,8 @@ impl Blit {
|
||||||
),
|
),
|
||||||
write_mask: wgpu::ColorWrites::ALL,
|
write_mask: wgpu::ColorWrites::ALL,
|
||||||
})],
|
})],
|
||||||
|
compilation_options:
|
||||||
|
wgpu::PipelineCompilationOptions::default(),
|
||||||
}),
|
}),
|
||||||
primitive: wgpu::PrimitiveState {
|
primitive: wgpu::PrimitiveState {
|
||||||
topology: wgpu::PrimitiveTopology::TriangleList,
|
topology: wgpu::PrimitiveTopology::TriangleList,
|
||||||
|
|
@ -136,6 +140,7 @@ impl Blit {
|
||||||
alpha_to_coverage_enabled: false,
|
alpha_to_coverage_enabled: false,
|
||||||
},
|
},
|
||||||
multiview: None,
|
multiview: None,
|
||||||
|
cache: None,
|
||||||
});
|
});
|
||||||
|
|
||||||
Blit {
|
Blit {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,11 @@ impl Compositor {
|
||||||
) -> Result<Self, Error> {
|
) -> Result<Self, Error> {
|
||||||
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
|
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
|
||||||
backends: settings.backends,
|
backends: settings.backends,
|
||||||
|
flags: if cfg!(feature = "strict-assertions") {
|
||||||
|
wgpu::InstanceFlags::debugging()
|
||||||
|
} else {
|
||||||
|
wgpu::InstanceFlags::empty()
|
||||||
|
},
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -162,6 +167,7 @@ impl Compositor {
|
||||||
),
|
),
|
||||||
required_features: wgpu::Features::empty(),
|
required_features: wgpu::Features::empty(),
|
||||||
required_limits: required_limits.clone(),
|
required_limits: required_limits.clone(),
|
||||||
|
memory_hints: wgpu::MemoryHints::MemoryUsage,
|
||||||
},
|
},
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue