-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect handling of Debug Marker functions #1286
Fix incorrect handling of Debug Marker functions #1286
Conversation
The implementation for VK_KHR_maintenance_5 exposed a bug in how the function for debug_marker functions were gotten. The bug was to only check if a driver supports a physical device when querying for device function pointers, which ignores the possibility of a layer supporting a device extension. This is an issue for VK_EXT_debug_marker, which requires trampoline functions to properly unwrap data passed in, resulting in the various debug marker functions returning NULL instead of a valid function pointer.
CI Vulkan-Loader build queued with queue ID 37128. |
CI Vulkan-Loader build # 2141 running. |
CI Vulkan-Loader build # 2141 failed. |
@@ -197,7 +205,7 @@ struct loader_device { | |||
bool ext_debug_marker_enabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be removed from driver_extensions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because this is to determine if to call down from the terminator into the driver instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, fixes my issue
7f77ef1
to
ad7a526
Compare
CI Vulkan-Loader build queued with queue ID 37628. |
CI Vulkan-Loader build # 2142 running. |
CI Vulkan-Loader build # 2142 failed. |
Debug utils, debug report, and debug marker are now supported directly in the test layer, allowing easy testing of the behavior of layers which support these debug extensions. This allows testing the matrix of combinations between drivers, layers, and loader support for these debug extensions. This commit also adds a 'injected_extension' concept into the test_layer, which allows recreating the behavior of layers which modify the extension list returned by the driver.
ad7a526
to
64055f0
Compare
CI Vulkan-Loader build queued with queue ID 38247. |
CI Vulkan-Loader build # 2143 running. |
CI Vulkan-Loader build # 2143 failed. |
CI Vulkan-Loader build queued with queue ID 38940. |
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.
6e168be
to
bb30aec
Compare
CI Vulkan-Loader build queued with queue ID 38951. |
CI Vulkan-Loader build # 2147 running. |
CI Vulkan-Loader build # 2147 passed. |
The implementation for VK_KHR_maintenance_5 exposed a bug in how the function
for debug_marker functions were gotten. The bug was to only check if a
driver supports a physical device when querying for device function pointers,
which ignores the possibility of a layer supporting a device extension. This
is an issue for VK_EXT_debug_marker, which requires trampoline functions to
properly unwrap data passed in, resulting in the various debug marker functions
returning NULL instead of a valid function pointer.