forked from mirrors/gecko-dev
Bug 1893188: Make ComputePipeline::Cleanup gracefully handle a missing bridge. r=webgpu-reviewers,ErichDonGubler
This aligns the implementation with RenderPipeline::Cleanup(). It also adds a drive-by assert to GetBindGroupLayout() in both classes to add confidence that the bridge is in the expected state. Differential Revision: https://phabricator.services.mozilla.com/D208916
This commit is contained in:
parent
14624240c9
commit
c0e2f475a2
2 changed files with 6 additions and 0 deletions
|
|
@ -33,6 +33,10 @@ void ComputePipeline::Cleanup() {
|
|||
mValid = false;
|
||||
|
||||
auto bridge = mParent->GetBridge();
|
||||
if (!bridge) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (bridge->CanSend()) {
|
||||
bridge->SendComputePipelineDrop(mId);
|
||||
if (mImplicitPipelineLayoutId) {
|
||||
|
|
@ -54,6 +58,7 @@ void ComputePipeline::Cleanup() {
|
|||
already_AddRefed<BindGroupLayout> ComputePipeline::GetBindGroupLayout(
|
||||
uint32_t aIndex) const {
|
||||
auto bridge = mParent->GetBridge();
|
||||
MOZ_ASSERT(bridge && bridge->CanSend());
|
||||
auto* client = bridge->GetClient();
|
||||
|
||||
ipc::ByteBuf bb;
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ void RenderPipeline::Cleanup() {
|
|||
already_AddRefed<BindGroupLayout> RenderPipeline::GetBindGroupLayout(
|
||||
uint32_t aIndex) const {
|
||||
auto bridge = mParent->GetBridge();
|
||||
MOZ_ASSERT(bridge && bridge->CanSend());
|
||||
auto* client = bridge->GetClient();
|
||||
|
||||
ipc::ByteBuf bb;
|
||||
|
|
|
|||
Loading…
Reference in a new issue