aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpubuffer.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move script gpu files into webgpu folder (#34415)atbrakhi2024-11-281-427/+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>
* Only send mapping back on unmap when MapMode = WRITE (#34054)Samson2024-10-291-6/+9
| | | Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Mark promise creation methods with CanGc (#33928)Josh Matthews2024-10-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Various CanGc fixes (#33800)webbeef2024-10-111-2/+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>
* clippy: Fix too_many_arguments warnings (#33648)tanishka2024-10-041-0/+1
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* chore: Update wgpu (#33506)Samson2024-09-211-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* clippy: Fix suggestions in `script`, `libservo`, and `servoshell` (#33453)Ali2024-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * fix clone on copy warning in servoshell Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Remove unecessary borrow in libservo Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Ignore too many arguments warning on create_constellation() Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * fix explicit auto-deref warning Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Autofix multiple clippy warnings in components/script Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> --------- Signed-off-by: Ali Zein Yousuf <azy5030@gmail.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>
* Move convert_label to Into implementation (#33348)Taym Haddadi2024-09-061-2/+1
| | | Signed-off-by: Taym <haddadi.taym@gmail.com>
* webgpu: Move actual Create* implementations from `GPUDevice` to Self (#33320)Samson2024-09-051-2/+51
| | | | | | | | | | | | | | | | | * Move actual Create* implementations from `GPUDevice` to Self Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * move Create*Pipeline to Self::create Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * `parse_render_pipeline` outside`GPURenderPipeline::create` Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* webgpu: Sync `GPUBuffer` (#33154)Samson2024-08-271-194/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Less nesting in webgpu response (#32799)Samson2024-07-171-22/+19
| | | | | | | | | | | | | * 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: Move errorscopes to WGPU thread (#32304)Samson2024-05-221-36/+27
| | | | | | | | | | | | | | | | | | | | | * 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: Refactor webgpu crate (#32255)Samson2024-05-081-3/+4
| | | | | | | * wgpu(_core) -> wgc * Refactor webgpu crate split lib.rs into multiple modules
* webgpu: Update to wgpu 0.20 (#32173)Samson2024-05-081-1/+2
| | | | | | | | | | | * Update wgpu to 0.20 * good expectations * Throw TypeError in configure on unsupported format instead of panic * Expect * `into_command_buffer_id`,`into_command_encoder_id`
* webgpu: Use safe callbacks & try_recv_timeout (#32008)Samson2024-04-301-10/+0
| | | | | | | | | | | | | * Use safe callback in SwapChainPresent and remove present_buffer_maps * Use rust closure in BufferMapAsync * Remove buffer_maps and dead code elimination * scope id passthrough * Inline callbacks * try_recv timeout and halve DEVICE_POLL_INTERVAL
* webgpu: Update wgpu to 0.19 (#31995)Samson2024-04-261-2/+12
| | | | | | | | | | | * 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
* changed `match` to 'matches!' (#31850)Aarya Khandelwal2024-03-251-4/+5
|
* clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)Oluwatobi Sofela2024-03-231-1/+1
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* WedIDL: bring dom/bindings/typedarray further in line with spec (#31375)Taym Haddadi2024-02-251-4/+4
| | | | | | | | | | | | | | | | | * WedIDL: bring dom/bindings/typedarray further in line with spec Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Rename HeapBufferSourceTypes to HeapBufferSource Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * fmt code Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* WebIDL: Use `ArrayBuffer` instead of raw `JSObject` in bindings (#31202)Taym Haddadi2024-02-131-37/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WebIDL: Use ArrayBuffer instead of raw JSObject in bindings Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Convert GPUBufferMapInfo mapping to Arc<Mutex> * Remove #[allow(unsafe_code)] from GPUBuffer * Add doc comments * Implement trace for Arc<Mutex<Vec<T>>> Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use #[no_trace] for GPUBufferMapInfo.mapping * Make create_new_external_array_buffer generic Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Address review comments * Remove HeapTypedArray::new and avoid cloning Arc Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use expect for GetMappedRange and ReadAsArrayBuffer Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Use doc comments for FileReaderSyncMethods Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Return for Error::JsFailed GetMappedRange and ReadAsArrayBuffer Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Fix detached_internal implementation and comments Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * format code Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Update expectations --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-6/+6
| | | | 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-19/+19
| | | Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Codegen support multiple interfaces in single webidl file & WebGPU single ↵Samson2023-09-301-2/+3
| | | | | | | | | webidl (#30448) * Codegen support multiple interfaces in single webidl file * Merge GPU*.webidl into WebGPU.webidl * Update gpu files to use WebGPUBinding module file
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-15/+14
| | | | | * strict imports formatting * Reformat all imports
* Upgrade whole webgpu stack (#29795)Samson2023-08-201-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+1
|
* Make GlobalScope.get_cx a static method.Josh Matthews2023-05-201-1/+1
|
* Prevent redundant texture and buffer destroy callsKunal Mohan2020-08-251-0/+1
|
* Change ErrorScopeId type to NonZeroU64Kunal Mohan2020-08-031-18/+24
| | | | And extract it from WebGPURequest
* Record validation error in mapAsync()Kunal Mohan2020-08-021-6/+18
|
* Error handling for promise returning operationsKunal Mohan2020-08-021-21/+35
|
* Report errors from void returning operationsKunal Mohan2020-08-011-8/+9
|
* Implement GPURenderBundleEncoder and GPURenderBundleKunal Mohan2020-07-241-2/+4
|
* Update GPUObjectBase webidl and cleanup valid flagsKunal Mohan2020-07-201-13/+5
|
* WebGPU update presentation data asynchronouslyKunal Mohan2020-07-031-2/+3
|
* Encapsulate buffer map fields in a separate structKunal Mohan2020-07-011-70/+58
|
* Implement GPUBuffer.getMappedRange()Kunal Mohan2020-07-011-68/+117
|
* Fix ArrayBuffer creation in buffer mappingKunal Mohan2020-06-271-6/+4
|
* Ensure proper unmap of bufferKunal Mohan2020-06-271-11/+11
|
* address review commentsKunal Mohan2020-06-271-26/+32
|
* Implement GPUBuffer.mapAsync and update wgpu-coreKunal Mohan2020-06-271-56/+160
|
* Add GPUSampler and GPUTextureView to BindingResourceKunal Mohan2020-06-171-1/+1
| | | | Add validation for BindGroups
* Update wgpu-core and wgpu-typesKunal Mohan2020-06-041-2/+2
|
* Make WebGPU resource creation fully asyncKunal Mohan2020-05-261-2/+8
| | | | | Remove some garbage code in adapter id checks Prevent panic during shutdown if using WebGPU
* Upgrade wgpu-core version to 0.5.0 and implement server-side logic for wgpu ↵Kunal Mohan2020-05-211-97/+2
| | | | | | id recycling Remove current implementation of MapReadAsync
* Validate copybuffertobuffer() + some spec updateKunal Mohan2020-05-151-5/+9
| | | | | The spec update includes renaming bindings to entries and adding CommandEncoderState.