ExternalTextures imported from HTMLVideoElements get "expired" in the
"automatic expiry task source", which is implemented by scheduling a
stable state task. ExternalTextures imported from VideoFrames get
expired when the VideoFrame is closed.
Keep track of each external texture used by any used bind group when
encoding compute and render passes. When submitting, if any passes
contain expired external textures then raise a validation error.
Currently we always create a new ExternalTexture when
importExternalTexture() is called. When support for reusing previously
imported textures is added, we must ensure they are correctly
"unexpired".
Differential Revision: https://phabricator.services.mozilla.com/D260295
Most changes are automated. Relevant bit is dom/.clang-format. I had to
manually disable clang-format in a few places where importing external
files and so on that aren't self-contained, and fix a couple includes /
forward declarations.
Differential Revision: https://phabricator.services.mozilla.com/D256800
This reverts commit 22fb6f2691.
Revert "Bug 1975714 - Update backlog expectations. r=webgpu-reviewers,nical"
This reverts commit 72b4644a09.
Revert "Bug 1975714 - Use `MOZ_CAN_RUN_SCRIPT_BOUNDARY` for `reportCompilationMessagesToConsole`. r=webgpu-reviewers,ErichDonGubler"
This reverts commit 4394625f93.
Revert "Bug 1975714 - Assert that the IDs in server messages are the same as the ones the `WebGPUChild` actor expects. r=webgpu-reviewers,nical"
This reverts commit 5ce8cf9b12.
Revert "Bug 1978369 - Stop leaking queues. r=webgpu-reviewers,nical"
This reverts commit 32ab875eab.
Revert "Bug 1975714 - Move remaining ID creation/destruction into resource creation/destruction functions. r=webgpu-reviewers,nical"
This reverts commit 122e1a6529.
Revert "Bug 1975714 - Replace uses of `make_slice` with `FfiSlice`. r=webgpu-reviewers,ErichDonGubler"
This reverts commit 62add844bf.
Revert "Bug 1975714 - Use `FfiSlice` in remaining places. r=webgpu-reviewers,ErichDonGubler"
This reverts commit 3812af72dd.
Revert "Bug 1975714 - Use an opaque pointer for `WebGPUParent`. r=webgpu-reviewers,ErichDonGubler"
This reverts commit bf83ea6553.
Revert "Bug 1975714 - Remove unneeded `#[allow(dead_code)]`. r=webgpu-reviewers,ErichDonGubler"
This reverts commit a84b40d4b8.
Revert "Bug 1977861 - Stop leaking BGLs returned by GPUPipelineBase.getBindGroupLayout(). r=webgpu-reviewers,ErichDonGubler"
This reverts commit b5ec027bf9.
Revert "Bug 1975714 - Turn function pointers into extern fns. r=webgpu-reviewers,nical"
This reverts commit d3681b7012.
Revert "Bug 1975714 - Make sure to resolve/reject all pending promises in `ClearActorState`. r=webgpu-reviewers,nical"
This reverts commit 2f607174ce.
Revert "Bug 1975714 - Do not immediately resolve the lost promise on `device.destroy()`. r=webgpu-reviewers,nical"
This reverts commit 1c10e1f698.
Revert "Bug 1960399 - Reject async pipeline creation with `GPUPipelineError`. r=webgpu-reviewers,nical"
This reverts commit ee47165e63.
Revert "Bug 1975714 - Correct comments. r=webgpu-reviewers,nical"
This reverts commit 9e0aabda0e.
Cleanup() should not call End(), because doing so exposes us to timing
dependencies on the cycle collection. Specifically, as noted in the
patches for Bug 1907457, cycle collection of encoders and their
resources could result in the resource getting destructed before the
encoder. Bug 1907457 "fixed" that by allowing cycles. This patch instead
fixes it by changing encoder Cleanup() to just tidy up resources and not
attempt to complete the work of the encoder by passing it to wgpu.
This also removes mUsedTextureViews from the RenderBundleEncoder, as it
is unused. RenderBundleEncoders have no reliance on TextureViews.
Differential Revision: https://phabricator.services.mozilla.com/D226200
The encoder classes already have strong references to the resources they
rely upon. That is enough to prevent those resources from being
released before the encoder. That's all we need! Including the resources
in cycle checking is just making it possible for the resource and the
encoder to be unlinked in the same cycle, in arbitrary order. That's
dangerous because it's the same outcome as if the encoder didn't have a
strong reference to the resource at all.
Differential Revision: https://phabricator.services.mozilla.com/D225914
Primarily this standardizes ComputePassEncoder, RenderBundleEncoder and
RenderPassEncoder on the "if (!mValid)" pattern for early exits for ffi
functions. It also attempts to make each class have at most two ways to
become invalid:
1) RenderBundleEncoder and RenderPassEncoder can become invalid at
construction time.
2) Those classes and ComputePassEncoder all now have an implementation
of their ::Cleanup method, which is called from the destructor, and the
Cleanup method is responsible for making the object invalid and
releasing internal resources (possibly by calling another method).
Together these changes make it easier to reason about what mValid means
for these classes, and what is the state of their internal resources.
Differential Revision: https://phabricator.services.mozilla.com/D208183
This makes sure we never create an invalid (zero) ID after incorrect usage of a command encoder.
It also simplifies the code. The JS object should not do any validaion (per spec) and simply forward the commands to the parent process where all of the validation is done.
Differential Revision: https://phabricator.services.mozilla.com/D192839
This makes sure we never create an invalid (zero) ID after incorrect usage of a command encoder.
It also simplifies the code. The JS object should not do any validaion (per spec) and simply forward the commands to the parent process where all of the validation is done.
Differential Revision: https://phabricator.services.mozilla.com/D192839
This makes sure we never create an invalid (zero) ID after incorrect usage of a command encoder.
It also simplifies the code. The JS object should not do any validaion (per spec) and simply forward the commands to the parent process where all of the validation is done.
Differential Revision: https://phabricator.services.mozilla.com/D192839
Inspired by emilio's suggestion in the shader module API patch. This tries to be the most straightforward way to go from the strings coming from IPC to the ones consumed by wgpu.
Differential Revision: https://phabricator.services.mozilla.com/D151024
Inspired by emilio's suggestion in the shader module API patch. This tries to be the most straightforward way to go from the strings coming from IPC to the ones consumed by wgpu.
Differential Revision: https://phabricator.services.mozilla.com/D151024