Skip to content

testHgiVulkan failure: Deferred command buffer submission breaks WaitForIdle, command buffer reuse, and garbage collection #3980

@erikaharrison-adsk

Description

@erikaharrison-adsk

Steps to reproduce:

  • Build and run testHgiVulkan on Windows, NVIDIA RTX A1000 6GB Laptop GPU

Notes:

  • Seems introduced by 30ce89430c
  • (with help from AI) The introduction of deferred command buffer submission means that vkQueueSubmit calls are now buffered rather than executed immediately, but is HgiVulkanDevice::WaitForIdle() still only called vkDeviceWaitIdle() — which returns instantly when no work has been submitted to the GPU. This leaves command buffers stuck in an "in-flight" state, preventing reuse and blocking the garbage collector from freeing GPU resources (since their inflight bits were never released).

Build command (likely most of this is not relevant):
python build_scripts\build_usd.py --jobs 4 --build-variant "debug" --openimageio --tests --vulkan --materialx --onetbb --build-args OpenImageIO,-DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE USD --build <build path> <install path>

Test command: ctest -C Debug -R testHgiVulkan -V

Test fail error message:

903: *** Running test: HgiVulkan
903:
903: Command buffers were not reused
903: Inflight bits invalid (2)
903: TestVulkanCommandQueue failed
903: HgiVulkan: Failed
903: Error: return code 1 doesn't match expected 0 (EXPECTED_RETURN_CODE).chdir: ...

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