aboutsummaryrefslogtreecommitdiffstats
path: root/components/webgpu
Commit message (Collapse)AuthorAgeFilesLines
* `compositing`: Combine `webrender_traits` and `compositing_traits` (#36372)Martin Robinson2025-04-064-4/+4
| | | | | | | | | | | | | | | These two traits both exposed different parts of the compositing API, but now that the compositor doesn't depend directly on `script` any longer and the `script_traits` crate has been split into the `constellation_traits` crate, this can be finally be cleaned up without causing circular dependencies. In addition, some unit tests for the `IOPCompositor`'s scroll node tree are also moved into `compositing_traits` as well. Testing: This just combines two crates, so no new tests are necessary. Fixes: #35984. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* webgpu: Add a `webgpu_traits` crate (#36320)Martin Robinson2025-04-0411-913/+62
| | | | | | | | | | | | | | | This breaks the `script_traits` dependency on `webgpu`. In general, the `traits` crates shouldn't depend on Servo non-`traits` crates. This is necessary to move "script to constellation" messages to the `constellation_traits` crate, making it the entire API for talking to the constellation. This will break a circular dependency when that happens. Testing: Successfully building is enough of a test for this one as it is mainly moving types around. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* webgpu: leverage routed_promise in calls returning promises (#35859)webbeef2025-03-233-53/+41
| | | | | | | Using the RoutedPromiseListener let us define a different response type for each promise. This removes unreachable branches that used to exist when they all shared the same WebGPUResponse. Signed-off-by: webbeef <me@webbeef.org>
* Migrate to the 2024 edition (#35755)Simon Wülker2025-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | * Migrate to 2024 edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Allow unsafe_op_in_unsafe_fn lint This lint warns by default in the 2024 edition, but is *way* too noisy for servo. We might enable it in the future, but not now. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Compile using the 2024 edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-032-4/+4
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* chore: Update wgpu (#35639)Samson2025-02-241-2/+2
| | | | | | | | | | | | | | * Update wgpu https://github.com/gfx-rs/wgpu/commit/2f255edc60e9669c8c737464c59af10d59a31126 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* deps: Upgrade to `webrender@0.66` (#35325)Martin Robinson2025-02-071-0/+1
| | | | | | | | | In addition to some small API changes, this downstream version of WebRender no longer depends on a very old version of time. This is the last step toward removing the dependency on `time0.1`. The review for this commit should also include: https://github.com/servo/webrender/commit/9f552bebab81a73e62068c42d94be2f9c0586ce4 Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* webgpu: implement get image for webgpu canvas (#35237)Samson2025-01-313-1/+25
| | | | | | | | | | | | | | | | | * Implement `get_image_data` for WebGPU canvas Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add docs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* chore: Update wgpu and fix webgpu pref (#35020)Samson2025-01-162-4/+1
| | | | | | | | | | | | | | | | | * Update wgpu to v24 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * `dom.webgpu.enabled` -> `dom_webgpu_enabled` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* api: Flatten and simplify Servo preferences (#34966)Martin Robinson2025-01-142-2/+2
| | | | | | | | | | | | | | | | | | | Flatten and simplify Servo's preferences code. In addition, have both preferences and options passed in as arguments to `Servo::new()` and make sure not to use the globally set preferences in `servoshell` (as much as possible now). Instead of a complex procedural macro to generate preferences, just expose a very simple derive macro that adds string based getters and setters. - All command-line parsing is moved to servoshell. - There is no longer the concept of a missing preference. - Preferences no longer have to be part of the resources bundle because they now have reasonable default values. - servoshell specific preferences are no longer part of the preferences exposed by the Servo API. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Update wgpu and impl `WGSLLanguageFeatures` (#34928)Samson2025-01-101-1/+1
| | | | | | | | | | | | | | * Update wgpu and impl `WGSLLanguageFeatures` https://github.com/gfx-rs/wgpu/commit/dc9b2eb71807ccafb7414425f1f8f24b5691685d Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update wgpu for supporting TextureView.usage (#34721)Samson2024-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update wgpu and add support for TextureView.usage https://github.com/gfx-rs/wgpu/commit/53f40794f275329a48efc7d1c637c91b8e51327d Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Disable wgpu logging Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * remove unused wgpu features Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * new expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * re Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update deny.toml Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
* Update wgpu to better handle optional attachment load/store ops (#34646)Samson2024-12-161-1/+1
| | | | | | | | | | | | | * Update wgpu to better handle attachment load/store ops Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update wgpu to trunk (#34607)Samson2024-12-133-81/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update wgpu https://github.com/gfx-rs/wgpu/commit/8f82992b9fa0fd71c19a4f5c2d8e2512ef22c010 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fix warnings Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * re Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * re Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Allow git source for gfx-rs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Upgrade Rust to 1.82.0 (#34592)Jonathan Schwender2024-12-121-0/+2
| | | | | | | | | | | | | | | | | | | | | * Fix deprecated PanicInfo alias Fixes: ```rust use of deprecated type alias `std::panic::PanicInfo`: use `PanicHookInfo` instead ``` Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * build: upgrade rustc to 1.82.0 Tracking issue for the silenced lints: https://github.com/servo/servo/issues/34591 Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Only send mapping back on unmap when MapMode = WRITE (#34054)Samson2024-10-292-17/+11
| | | Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Move supported context format to content timeline (#34028)Samson2024-10-282-26/+17
| | | | | | | | | | | | | | * Move supported context format to content timeline https://github.com/gpuweb/gpuweb/pull/4911 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* clippy: Fix warnings in `components/script` & `components/webgpu` (#33653)tanishka2024-10-051-8/+5
| | | | | | | | | | | | | * clippy: Fix warnings in component/script & component/webgpu Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * fix: use same variable name in if-let block Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* chore: Update wgpu again (#33635)Samson2024-10-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * Update wgpu again Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update components/webgpu/swapchain.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> * Update components/webgpu/wgpu_thread.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix too_many_arguments warnings (#33648)tanishka2024-10-041-0/+1
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* clippy: Fix several warnings in `components/script` and `components/webgpu` ↵tanishka2024-10-041-2/+2
| | | | | | | | | | | | | | | | | | | (#33633) * clippy: Fix several warnings in components Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * fix: Allow upper_case_acronyms Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * clippy: Fix more warnings Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* webgpu: Introduce PresentationId to ensure updates with newer presentation ↵Samson2024-10-041-31/+48
| | | | | | | | | | | | | | | | (#33613) * Introduce PresentationId to ensure update with newer presentation Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update swapchain.rs Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
* replaced `.map` with `.and_then` and removed `.flatten()` (#33631)Mercy Bassey2024-10-031-2/+1
| | | Signed-off-by: mercybassey <udohmercy911@gmail.com>
* webgpu: renovate gpucanvascontext and webgpu presentation to match the spec ↵Samson2024-10-014-210/+410
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#33521) * Reimpl gpucanvascontext Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * ValidateTextureDescriptorAndCreateSwapChain Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * reconfigure Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * resize Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * work around deadlocks in wgpu core Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * match spec even more by moving all swapchain operations into one updatecontext Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * error handling Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * enable one test Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * label dummy texture Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * update expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * clean some expectation (they are not flaky anymore) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * one more Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * change for configuration change in update_wr_image Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * DEFAULT_IMAGE_FORMAT Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * introduce WebGPUImageDescriptor Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: destroy GPUTexture without erroring (#33534)Samson2024-09-252-10/+3
| | | | | | | | | | | | | * destroy GPUTexture without erroring (errors can be safely ignored) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* reuse ImageKey for gpucanvascontext (#33517)Samson2024-09-223-18/+13
| | | Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* chore: Update wgpu (#33506)Samson2024-09-214-89/+72
| | | | | | | | | | | | | | | | | | | | | | | | | * Update wgpu Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * use all backends at runtime Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * clean up some adapter stuff Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * flakes Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Add `rust-version` to all `Cargo.toml` files (#33483)Martin Robinson2024-09-171-0/+1
| | | | | | | This is another step preparing for building Servo without `mach`. Fixes #33430. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* webgpu: Use `PresentationBufferState` instead of bucketing buffer_ids per ↵Samson2024-09-161-39/+93
| | | | | | | | | | | | | | | state (#33457) * `PresentationBufferState` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixups Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Do one allocation less on presentation by keeping GPUBuffer mapped ↵Samson2024-09-131-31/+74
| | | | | | | | | | | | | | | | | | | (#33387) * `GPUPresentationBuffer` in `WGPUExternalImages` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * mv presentation_buffer in if let Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * docs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Factor out swapchain to separate file (#33367)Samson2024-09-094-290/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move some stuff to swapchain.rs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Use typed WebGPUContextId instead of u64 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Extract create_swapchain function and move more stuff in it Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * extract destroy_swapchain Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * extract swapchain_present Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * extract update_wr_image callback Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* tidy: Fix rustdoc warnings and add a tidy check for a common URL issue (#33366)Martin Robinson2024-09-081-1/+1
| | | | | | | | This change fixes all rustdoc errors and also adds a tidy check for a very common rustdoc URL issue. Eventually rustdoc warnings should likely cause the build to fail, but this catches those issues sooner in order to not waste so much developer time. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* webgpu: Clean up `GPUCommandEncoders` and add some validation (#33223)Samson2024-08-302-28/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * TextureUsages::from_bits_retain Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fixup CreateBindGroupLayout Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * GPUExtent3D checking and converting Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Cleanup GPUCommandEncoders and some TODOs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * validate gpuorigin3d Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * validate GPUColor Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * set good expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update wgpu (#33209)Samson2024-08-272-186/+195
| | | | | no gfx_select macro and some minor changes to passes Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Sync `GPUBuffer` (#33154)Samson2024-08-273-30/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * More helpers on `Promise` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Sync `GPUBuffer` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set some good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Some bad expect also on firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Extract DataBlock, DataView impl from GPUBuffer Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix size check to work on 32bit platforms Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Align `writeBuffer` with spec (#33147)Samson2024-08-211-1/+0
| | | | | | | | | | | | | | | | | * Sync `WriteBuffer` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Change assert to debug_assert Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update wgpu (#32981)Samson2024-08-081-5/+5
| | | | | | | | | | | | | * Update wgpu to https://github.com/gfx-rs/wgpu/commit/781b54a8b9cee1a2cb22bda565662edec52eb70e Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Implement proper async pipeline creation and GPUPipelineError (#32636)Samson2024-08-083-12/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add GPUPipelineError Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Proper GetBindGroupLayout Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Proper Create*PipelineAsync Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixups Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * more good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* separate Queue&Device Id (#32966)Samson2024-08-083-27/+24
| | | Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Use wgpu's instead of string errors and update limits handling (#32925)Samson2024-08-042-40/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use wgpu specific errors Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * WIP Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix records erasing enforcerange Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * page can already be destroyed Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Support more limits Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set good results Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set OK (not PASS) expect CRASH Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup expectation Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * bad expectations https://github.com/gfx-rs/wgpu/issues/6075 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * set bad expectation render bundleencoder needs to be rewritten Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Update wgpu to 22.0 (#32827)Samson2024-07-252-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update wgpu to https://github.com/gfx-rs/wgpu/commit/c0e7c1ef945a7dd61c81fb951ea554213811aee0 This is few commits ahead of wgpu 22.0 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Make it compile Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Move usage checking to device timeline as per spec Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add logging (trace) of WEBGPU messages This is very useful when debugging Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * update wgpu again Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * set good Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * skip `webgpu:api,operation,memory_sync,texture,same_subresource` for flakyness Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * rm r.json Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Remove failure breaks from webgpu thread (#32814)Samson2024-07-201-5/+1
| | | | | | | | | | | | | | | | | * Remove breaks from webgpu requests Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * limit,out_of_range TIMEOUT->FAIL Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* fix a couple of simple clipy warnings (#32813)Rodion Borovyk2024-07-191-5/+5
| | | Signed-off-by: Rodion Borovyk <rodion.borovyk@gmail.com>
* Less nesting in webgpu response (#32799)Samson2024-07-173-113/+115
| | | | | | | | | | | | | * Remove Option wrap of WebGPUResponse Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Replace WebGPUResponseResult with WebGPUResponse Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Divide message code into separate files (#32700)Samson2024-07-125-73/+93
| | | | | | | * Spilt webgpu ipc messages even more * Add license to mod.rs * file docs
* webgpu: Update wgpu and revamp RenderPass (#32665)Samson2024-07-046-31/+332
| | | | | | | | | | | | | | | | | | | | | * Update wgpu and revamp RenderPass * Set good expectations * Set one bad expectation * send_render_command * small fixups * docs * doc * Put RenderPass inside PassState * Use Pass enum for ComputePass too * fix docs
* webgpu: Implement ShaderCompilationInfo (#32642)Samson2024-07-022-3/+56
| | | | | | | | | * ShaderCompilationInfo * expectations * Handle CompilationInfo promise in GPUShaderModule * Fix my english
* webgpu: Update wgpu and revamp computepass (#32575)Samson2024-06-284-46/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Proper GPUDevice cleanup (#32520)Samson2024-06-202-27/+54
| | | | | | | | | | | * Make device cleanup right * Use weakref for GPUDevice in globalscope * No need to destroy device on drop * DeviceReason early return * make remove_gpu_device to be the only way to remove device
* Use workspace definitions for all crates and update to the 2021 edition (#32544)Martin Robinson2024-06-181-5/+5
|