aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpuadapter.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move script gpu files into webgpu folder (#34415)atbrakhi2024-11-281-255/+0
| | | Signed-off-by: atbrakhi <atbrakhi@igalia.com>
* Generate a trait abstracting over all known DOM interfaces (#34357)Josh Matthews2024-11-241-1/+1
| | | | | | | | | | | | | | | | | * script: Generate trait for all DOM interfaces and parameterize generated Methods traits over it. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Update trait implementations with new generic type. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Mark promise creation methods with CanGc (#33928)Josh Matthews2024-10-221-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add CanGc annotations to promise constructor. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc arguments for Promise::new_in_current_realm. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix out-of-order entries. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from Promise::new. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Suppress clippy warning. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* CanGc fixes in components/script/dom (#33891)tanishka2024-10-171-2/+5
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Various CanGc fixes (#33800)webbeef2024-10-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * CanGc fix for pagetransitionevent Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/node Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for gamepad Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for gpu Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/element Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for xhr Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for dom/worker Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for rtcdatachannel Signed-off-by: webbeef <me@webbeef.org> * CanGc fix for rtcerror Signed-off-by: webbeef <me@webbeef.org> * Address review comments Signed-off-by: webbeef <me@webbeef.org> --------- Signed-off-by: webbeef <me@webbeef.org>
* chore: Update wgpu (#33506)Samson2024-09-211-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* webgpu: Sync various parts of spec (#33009)Samson2024-08-191-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Sync `GPUObjectDescriptorBase` (label is not option anymore) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Sync `GPUFeatureName` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * shader_f16 feature is not usable in wgpu so disable it Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * sync `GPUTextureFormat` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * `validate_texture_format_required_features` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Sync `GPUTexture` attributes Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Make `entryPoint` in `GPUProgrammableStage` optional Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Bad expectations because naga does not support cons declarations Also fail on firefox, where skipped before due to missing device features Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Bad expectation, also fails on firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Bad expectations, because naga does not support `let pos = positions[vertex_index];` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set expectation external texture does not work in firefox too (again naga) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * set bad expectations, because naga does not support `enable` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set bad expectations for, `Texture with '' label has been destroyed` also fails in firefox with same reason Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * one bad expectation also on firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * expect that also matches firefox Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * more expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Use only 1 proc for _webgpu Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * better doc comment 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-081-2/+7
| | | 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-041-86/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Less nesting in webgpu response (#32799)Samson2024-07-171-28/+23
| | | | | | | | | | | | | * 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: Remove mutex around Identities (#32682)派卡 (pi-cla)2024-07-031-1/+0
|
* webgpu: Move errorscopes to WGPU thread (#32304)Samson2024-05-221-11/+8
| | | | | | | | | | | | | | | | | | | | | * Prepare errorscopes logic in wgpu_thread * remove scope_id from ipc * new GPUErrors per spec * remove cotent timeline error_scope * fixup poperrorscope types * device_scope -> gpu_error and nice errors * Handle errors detection more elegantly * good expectations * new expectations * Make error_scope.errors Vec as per spec
* webgpu: Update wgpu to 0.19 (#31995)Samson2024-04-261-32/+61
| | | | | | | | | | | * Update wgpu to https://github.com/gfx-rs/wgpu/commit/32e70bc1635905c508d408eb1cf22b2aa062ffe1 (0.19) * Update expect only good * reexpect * remove dbg stuff * Remove all occurrences of dx11_hub
* clippy: Allow `too_many_arguments` for existing functions (#31974)eri2024-04-021-0/+1
| | | | | * Allow `too_many_arguments` for existing functions * fix: Surround ASCII with code block in rustdoc
* clippy: Fix needless borrow warnings (#31813)Oluwatobi Sofela2024-03-211-1/+1
|
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-5/+5
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* Fix failed request for adapter when not available (#31002)Taym Haddadi2024-01-091-25/+25
| | | Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Codegen support multiple interfaces in single webidl file & WebGPU single ↵Samson2023-09-301-1/+1
| | | | | | | | | webidl (#30448) * Codegen support multiple interfaces in single webidl file * Merge GPU*.webidl into WebGPU.webidl * Update gpu files to use WebGPUBinding module file
* Add GPUSupportedFeatures and update GPUSupportedLimits (#30359)Samson2023-09-141-39/+34
| | | | | | | * GPUSupportedFeatures * New supported limits * Update expectations
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-9/+9
| | | | | * strict imports formatting * Reformat all imports
* Upgrade whole webgpu stack (#29795)Samson2023-08-201-73/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow noidl files in script/dom/webidls * Upgrade wgpu to 0.16 and refresh whole webgpu implementation * Update WebGPU test expectations * misc * MutNullableDom -> DomRefCell<Option<Dom for GPUTexture * Direct use of GPUTextureDescriptor * Remove config from GPUCanvasContext * misc * finally blue color * gpubuffer "handle" error * GPU object have non-null label * gpu limits and info * use buffer_size * fix warnings * Cleanup * device destroy * fallback adapter * mach update-webgpu write webgpu commit hash in file * Mising deps in CI for webgpu tests * Updated expectations * Fixups * early reject * DomRefCell<Option<Dom -> MutNullableDom for GPUTexture
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `no_trace` option to JSTraceable derive * NoTrace wrapper * Port some types to no_trace schematics * Fixing my unsafe mistakes (not tracing traceables) * Add docs & safety guards for no_trace Safety guards (trait shenanigans) guarantees safety usage of `no_trace` * Port canvas_traits to no_trace * Port servo_media to no_trace * Port net_traits to no_trace * Port style to no_trace * Port webgpu to no_trace * Port script_traits to no_trace * Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace * unrooted_must_root lint in seperate file * Add trace_in_no_trace_lint as script_plugin * Composable types in must_not_have_traceable * Introduced HashMapTracedValues wrapper * `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>` * Port rest of servo's types to no_trace * Port html5ever, euclid, mime and http to no_trace * Port remaining externals to no_trace * Port webxr and Arc<Mutex<_>> * Fix spelling in notrace doc
* Remove global argument from Promise::new_in_current_realm.Josh Matthews2023-05-201-1/+1
|
* Use Device limits and features provided by userKunal Mohan2020-09-231-4/+56
| | | | Spec update
* Change ErrorScopeId type to NonZeroU64Kunal Mohan2020-08-031-8/+11
| | | | And extract it from WebGPURequest
* Error handling for promise returning operationsKunal Mohan2020-08-021-5/+12
|
* Implement GPURenderBundleEncoder and GPURenderBundleKunal Mohan2020-07-241-0/+3
|
* Implement Async Error reporting for WebGPU and update wgpu-coreKunal Mohan2020-07-161-1/+4
|
* Update wgpu-core and wgpu-typesKunal Mohan2020-07-041-1/+1
|
* Update wgpu-core and wgpu-typesKunal Mohan2020-06-191-0/+2
|
* Update wgpu-core and wgpu-typesKunal Mohan2020-06-041-6/+4
|
* Upgrade wgpu-core version to 0.5.0 and implement server-side logic for wgpu ↵Kunal Mohan2020-05-211-4/+4
| | | | | | id recycling Remove current implementation of MapReadAsync
* Share single gpu_id_hub among all threads in a processKunal Mohan2020-05-151-0/+1
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+1
|
* Fixing some style related issues in WebGPU.Istvan Miklos2020-02-271-3/+13
| | | | | | Changed the Requests/Response from tuples to named struct variants and also sorted in alphabetical order. Replaced the ID generator functions from `globalscope` with a single function, which returns a `RefMut` and can call the appropriate method to generate resource IDs.
* Initial implementation of GPUQueueZakor2020-02-131-1/+2
| | | | | Added WebIDL bindings for `GPUQueue`. Implemented the `submit` function of `GPUQueue` and `defaultQueue` function of `GPUDevice`.
* rename compartment to realmKunal Mohan2020-01-241-3/+3
|
* Support worker for WebGPUIstvan Miklos2020-01-231-17/+10
| | | | | To create resource ids for the WebGPU we need to access the `IdentityHub`. In order to access the `IdentityHub` from a `Window` or a `Worker` as well, I've moved the `IdentityHub` to the `GlobalScope` from the `Navigator`.
* Fix returned error types in WebGPUZakor Gyula2020-01-131-7/+3
|
* Only start WebGPU thread if an adapter is requestedZakor Gyula2020-01-131-8/+19
|
* Initial implementation of GPUBuffer for WebGPUIstvan Miklos2019-12-171-2/+1
| | | | | Added WebIDL bindings for GPUBuffer, GPUBufferDescriptor, GPUBufferUsage Implemented the `createBuffer` and `createBufferMapped` functions of GPUDevice
* Replace wgpu-native with wgpu-coreZakor Gyula2019-12-061-4/+6
|
* Initial implementation of GPUDevice for WebGPUIstvan Miklos2019-12-051-2/+62
| | | | | Added the WebIDL bindigs for GPUDevice, GPUObjectDescriptorBase, GPUDeviceDescriptor, GPUObjectBase Implemented the `requestDevice` function of `GPUAdapter`
* Initial implementation of WebGPU APIZakor Gyula2019-11-211-0/+63