X Tutup
Skip to content

[Vulkan] GPU TDR / VK_ERROR_DEVICE_LOST during DeviceContext destruction on window close #366

@SherSpidey

Description

@SherSpidey

Description

An intermittent GPU TDR (Timeout Detection and Recovery) and an intermittent assertion failure occurs in the Vulkan backend when exiting the application. This has been observed using the official Tutorial00_HelloWin32 sample when configured to use the Vulkan API. The issue appears sporadically after several runs and is triggered during the final cleanup phase as the window is closed(via the "X" button).

Image

Environment

  • Graphics API/Card: Vulkan/Nvidia T400 4G (latest driver)
  • Sample: Tutorial00_HelloWin32
  • OS: Windows 11
  • Diligent Engine Version: Latest Master

Steps to Reproduce

  • Build and run Tutorial00_HelloWin32 with backend changed to Vulkan.
  • Close the application (e.g., via the "X" button, not the 'Esc' key).
  • Repeat the process several times.
  • Observe the sporadic crash during the destruction of the global DeviceContext.

Potential Cause ?

The crash does not occur when exiting via the Esc key, as it allows g_pTheApp.reset() to execute while the HWND is still valid. However, clicking the X button dispatches window destruction messages before the DeviceContext is destroyed, leading to a mandatory Flush() on an invalidated surface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup