mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
webgpu: Update wgpu and revamp computepass (#32575)
* Do not wait on drop, but rather wake poller thread * Update wgpu and render stuff * Set some good expectations * Update wgpu again * handle IPC error as warning * More good expectations * Some more expectations CTS does not match the spec: https://github.com/gpuweb/cts/issues/3806 * This expectations are due to other changes in servo also happening on main * Explain error_command_encoders and remove RefCell around it * fixup * store validness of passes * More good expectations * More docs * this assert is wrong * This is even more right per CTS/spec Only Command encoder state errors are allowed here, but wgpu does not exposes them. * More good expectations * One bad expectation * Fix my english
This commit is contained in:
parent
fced0b4940
commit
e9cf4d4971
16 changed files with 372 additions and 1870 deletions
|
@ -3,6 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use smallvec::SmallVec;
|
||||
use webgpu::identity::{ComputePass, ComputePassId};
|
||||
use webgpu::wgc::id::markers::{
|
||||
Adapter, BindGroup, BindGroupLayout, Buffer, CommandEncoder, ComputePipeline, Device,
|
||||
PipelineLayout, RenderBundle, RenderPipeline, Sampler, ShaderModule, Texture, TextureView,
|
||||
|
@ -31,6 +32,7 @@ pub struct IdentityHub {
|
|||
samplers: IdentityManager<Sampler>,
|
||||
render_pipelines: IdentityManager<RenderPipeline>,
|
||||
render_bundles: IdentityManager<RenderBundle>,
|
||||
compute_passes: IdentityManager<ComputePass>,
|
||||
}
|
||||
|
||||
impl IdentityHub {
|
||||
|
@ -50,6 +52,7 @@ impl IdentityHub {
|
|||
samplers: IdentityManager::new(),
|
||||
render_pipelines: IdentityManager::new(),
|
||||
render_bundles: IdentityManager::new(),
|
||||
compute_passes: IdentityManager::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -225,6 +228,14 @@ impl Identities {
|
|||
pub fn kill_render_bundle_id(&mut self, id: RenderBundleId) {
|
||||
self.select(id.backend()).render_bundles.free(id);
|
||||
}
|
||||
|
||||
pub fn create_compute_pass_id(&mut self, backend: Backend) -> ComputePassId {
|
||||
self.select(backend).compute_passes.process(backend)
|
||||
}
|
||||
|
||||
pub fn kill_compute_pass_id(&mut self, id: ComputePassId) {
|
||||
self.select(id.backend()).compute_passes.free(id);
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Identities {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue