Skip to content

Don't drop command buffers when submitting in wgpu_core#4660

Merged
nical merged 1 commit intogfx-rs:trunkfrom
nical:cmdbuf-destroy
Nov 9, 2023
Merged

Don't drop command buffers when submitting in wgpu_core#4660
nical merged 1 commit intogfx-rs:trunkfrom
nical:cmdbuf-destroy

Conversation

@nical
Copy link
Copy Markdown
Contributor

@nical nical commented Nov 9, 2023

Since wgpu's submit API consumes command buffers, they are dropped when submitting via wgpu but not when when using wgpu_core.

Checklist

  • Run cargo clippy.

Connections

Addresses #4659, unblocks https://phabricator.services.mozilla.com/D192839

Description

With WebGPU it is possible for a submitted command buffer to appear inother API entry point. This should cause validation errors but currently it panics because submit unregisters the command buffers. This PR makes it so command buffers are not dropped at the wgpu core level when submitting (they are dropped at the wgpu level to avoid changing the API).

Testing

This is covered by the CTS in firefox and for the wgpu behavior, it is exercised by a number of the existing tests.

Since wgpu's submit API consumes command buffers, they are dropped when submitting via wgpu but not when when using wgpu_core.
@nical nical requested a review from a team as a code owner November 9, 2023 15:41
@nical nical merged commit 890825f into gfx-rs:trunk Nov 9, 2023
@nical nical deleted the cmdbuf-destroy branch November 9, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants