Skip to content

Crash on vulkan when multiple command encoders are used after #5681. #5774

@Elabajaba

Description

@Elabajaba

Description
Since #5681, wgpu now crashes with "More than one surface texture is being used from the same swapchain. This will cause a deadlock in release." if more than 1 command encoder (with a renderpass that has a texture view of your Surface texture) is used.

Repro steps
Create and submit a 2nd command encoder with a renderpass that uses a view of your surface texture (can create a new texture view or just re-use an existing one) when running on Vulkan.
Run https://github.com/Elabajaba/wgpu-vk-surface-crash

Expected vs observed behavior
Expected: Doesn't crash
Observed:

thread 'main' panicked at E:\temp\wgpu\wgpu-hal\src\vulkan\mod.rs:966:9:
More than one surface texture is being used from the same swapchain. This will cause a deadlock in release.

Platform
Happens on both Windows 11 + AMD gpu and Linux+Mesa RADV (amd) + Wayland.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions