Make test_layer delete destroyed devices
authorCharles Giessen <charles@lunarg.com>
Fri, 8 Sep 2023 20:28:35 +0000 (14:28 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Fri, 8 Sep 2023 21:56:37 +0000 (15:56 -0600)
commit7eb9da1e5e9f261c50eefa727ac010ff23f851f1
treef1c21550ce9953e4a996dada9b2d7bb314d849dd
parentcfe07e3648fe89ef5d909ab92b562419db5369f0
Make test_layer delete destroyed devices

Destroyed devices need to be removed from the test_layer's created_devices
vector, so that it doesn't accidentally mistake dead devices for alive ones
when checking for whether a device extension is supported or not.

This caused multiple days of debugging headache as it caused sporadic test
failures due to the re-use of VkDevice handle values (which is caused by
the memory manager reusing allocations). Since a second VkDevice could share
the handle value of the first, and the first wasn't removed from the vector,
test_layer would use the data assocated with the first device by mistake.
tests/framework/layer/test_layer.cpp
tests/loader_debug_ext_tests.cpp