Bug 1905383: Make WebGPU encoders not cycle check their subresources. r=webgpu-reviewers,teoxoy
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
This commit is contained in:
@@ -13,8 +13,7 @@
|
||||
|
||||
namespace mozilla::webgpu {
|
||||
|
||||
GPU_IMPL_CYCLE_COLLECTION(ComputePassEncoder, mParent, mUsedBindGroups,
|
||||
mUsedPipelines)
|
||||
GPU_IMPL_CYCLE_COLLECTION(ComputePassEncoder, mParent)
|
||||
GPU_IMPL_JS_WRAP(ComputePassEncoder)
|
||||
|
||||
void ffiWGPUComputePassDeleter::operator()(ffi::WGPURecordedComputePass* raw) {
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
|
||||
namespace mozilla::webgpu {
|
||||
|
||||
GPU_IMPL_CYCLE_COLLECTION(RenderBundleEncoder, mParent, mUsedBindGroups,
|
||||
mUsedBuffers, mUsedPipelines, mUsedTextureViews)
|
||||
GPU_IMPL_CYCLE_COLLECTION(RenderBundleEncoder, mParent)
|
||||
GPU_IMPL_JS_WRAP(RenderBundleEncoder)
|
||||
|
||||
void ffiWGPURenderBundleEncoderDeleter::operator()(
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
|
||||
namespace mozilla::webgpu {
|
||||
|
||||
GPU_IMPL_CYCLE_COLLECTION(RenderPassEncoder, mParent, mUsedBindGroups,
|
||||
mUsedBuffers, mUsedPipelines, mUsedTextureViews,
|
||||
mUsedRenderBundles)
|
||||
GPU_IMPL_CYCLE_COLLECTION(RenderPassEncoder, mParent)
|
||||
GPU_IMPL_JS_WRAP(RenderPassEncoder)
|
||||
|
||||
void ffiWGPURenderPassDeleter::operator()(ffi::WGPURecordedRenderPass* raw) {
|
||||
|
||||
Reference in New Issue
Block a user