aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpucommandencoder.rs
Commit message (Collapse)AuthorAgeFilesLines
* chore: Update wgpu (#33506)Samson2024-09-211-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Move convert_label to Into implementation (#33348)Taym Haddadi2024-09-061-5/+4
| | | Signed-off-by: Taym <haddadi.taym@gmail.com>
* webgpu: Move actual Create* implementations from `GPUDevice` to Self (#33320)Samson2024-09-051-10/+45
| | | | | | | | | | | | | | | | | * 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>
* Transform convert_* functions in gpuconvert.rs to From/TryFrom ↵Taym Haddadi2024-09-041-14/+13
| | | | | implementations (#33302) Signed-off-by: Taym <haddadi.taym@gmail.com>
* webgpu: Clean up `GPUCommandEncoders` and add some validation (#33223)Samson2024-08-301-70/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* webgpu: Sync various parts of spec (#33009)Samson2024-08-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* webgpu: Update wgpu and revamp RenderPass (#32665)Samson2024-07-041-79/+74
| | | | | | | | | | | | | | | | | | | | | * 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: Remove mutex around Identities (#32682)派卡 (pi-cla)2024-07-031-1/+0
|
* webgpu: Update wgpu and revamp computepass (#32575)Samson2024-06-281-66/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* webgpu: Move errorscopes to WGPU thread (#32304)Samson2024-05-221-54/+33
| | | | | | | | | | | | | | | | | | | | | * 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-1/+1
| | | | | | | * wgpu(_core) -> wgc * Refactor webgpu crate split lib.rs into multiple modules
* webgpu: Update to wgpu 0.20 (#32173)Samson2024-05-081-1/+1
| | | | | | | | | | | * 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: Update wgpu to 0.19 (#31995)Samson2024-04-261-1/+1
| | | | | | | | | | | * 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: Fix needless borrow warnings (#31813)Oluwatobi Sofela2024-03-211-2/+2
|
* Move convert_* functions into gpuconvert.rs (#31521)eri2024-03-061-68/+8
| | | | | * feat: unify convert_* functions across gpu*.rs files #31104 * chore: reorder and format
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-9/+9
| | | | 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.
* Update wgpu to 0.18.1 (#30926)Samson2023-12-251-0/+3
| | | | | | | * Update wgpu to 0.18.1 * Fix webgpu code * tidy
* Codegen support multiple interfaces in single webidl file & WebGPU single ↵Samson2023-09-301-9/+6
| | | | | | | | | 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/+15
| | | | | * strict imports formatting * Reformat all imports
* Upgrade whole webgpu stack (#29795)Samson2023-08-201-110/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* defer encoding errors to finish()Kunal Mohan2020-08-221-78/+14
|
* upgrade wgpu to v0.6Kunal Mohan2020-08-221-0/+1
|
* Record errors in GPUCommandEncoder.BeginPass() and EncoderPass.endPass()Kunal Mohan2020-08-071-93/+124
|
* Change ErrorScopeId type to NonZeroU64Kunal Mohan2020-08-031-37/+53
| | | | And extract it from WebGPURequest
* Report errors from void returning operationsKunal Mohan2020-08-011-5/+41
|
* Refactor and improve GPUErrorScopesKunal Mohan2020-07-301-7/+9
| | | | Remove use of equivalent BGLs
* Implement GPURenderBundleEncoder and GPURenderBundleKunal Mohan2020-07-241-6/+20
|
* update wgpu, use serializable descriptorsKunal Mohan2020-07-221-50/+53
|
* Implement GPUCommandEncoder.copy commandsKunal Mohan2020-07-211-34/+166
|
* Update GPUObjectBase webidl and cleanup valid flagsKunal Mohan2020-07-201-7/+5
|
* Implement Async Error reporting for WebGPU and update wgpu-coreKunal Mohan2020-07-161-17/+18
|
* Implement GPUBuffer.mapAsync and update wgpu-coreKunal Mohan2020-06-271-54/+32
|
* Add GPUSampler and GPUTextureView to BindingResourceKunal Mohan2020-06-171-2/+2
| | | | Add validation for BindGroups
* Update wgpu-core and wgpu-typesKunal Mohan2020-06-041-0/+2
|
* Implement GPURenderPassEncoderKunal Mohan2020-06-041-11/+110
| | | | | Add webidls for GPURenderPassEncoder and GPURenderEncoderBase and implement relevant methods.
* Make WebGPU resource creation fully asyncKunal Mohan2020-05-261-9/+6
| | | | | 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-1/+1
| | | | | | id recycling Remove current implementation of MapReadAsync
* Validate copybuffertobuffer() + some spec updateKunal Mohan2020-05-151-6/+87
| | | | | The spec update includes renaming bindings to entries and adding CommandEncoderState.
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+1
|
* Fixing some style related issues in WebGPU.Istvan Miklos2020-02-271-8/+8
| | | | | | 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.
* Implement GPUComputePassEncoder functionsIstvan Miklos2020-02-191-6/+2
| | | | Implement the `dispatch`, `endPass`, `setBindGroup`, `setPipeline` functions of `GPUComputePassEncoder`.
* Initial implementation of GPUQueueZakor2020-02-131-2/+14
| | | | | Added WebIDL bindings for `GPUQueue`. Implemented the `submit` function of `GPUQueue` and `defaultQueue` function of `GPUDevice`.
* Initial implementation of GPUCommandEncoderZakor Gyula2020-02-111-0/+114
Added WebIDL bindings for `GPUCommandEncoder`, `GPUCommandBuffer`, `GPUComputePassEncoder`, `GPUProgrammablePassEncoder`. Implemented the `beginComputePass`, `copyBufferToBuffer` and `finish` functions of `GPUCommandEncoder`. Implemented the `createCommandEncoder` function of `GPUDevice`.