Skip to content

Failed device creation with device lost callback mode = WaitAnyOnly. #546

Description

@lokokung

As per the title, if we try to create a device but fail with a DeviceDescriptor that has a deviceLostCallbackMode = WaitAnyOnly, the callback will be effectively leaked until the Instance is destroyed because the only way to make that callback fire would have been to call WaitAny on the wgpu::Future we get from device.GetDeviceLostFuture(), but given that the device creation failed, the RequestDeviceCallback will pass nullptr for the Device, and hence the user will never have a way to call device.GetDeviceLostFuture().

Metadata

Metadata

Assignees

No one assigned

    Labels

    !discussNeeds discussion (at meeting or online)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions