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