https://bugs.winehq.org/show_bug.cgi?id=49813
Bug ID: 49813 Summary: Implement debugging feedback extensions (VK_EXT_debug_utils/VK_EXT_debug_report) to forward data to Linux impl Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: winevulkan Assignee: wine-bugs@winehq.org Reporter: loothelion@nvidia.com Distribution: ---
Was discussing the following earlier with Georg Lehmann and Hans-Kristian Arntzen:
Looking for a way to forward application Vulkan API debugging info (tagged objects / perfmarkers / queue-labels) such that the host loader will receive these calls from the windows application.
I believe that VK_EXT_debug_marker should pass-through fine with ToT winevulkan, but that should be confirmed.
A few thoughts on test cases to verify this missing functionality / verify an implementation:
- Sascha Willems' debugmarker example - https://github.com/SaschaWillems/Vulkan/tree/master/examples/debugmarker (uses VK_EXT_debug_marker)
- Quake 2 RTX - https://github.com/NVIDIA/Q2RTX (uses VK_EXT_debug_utils/VK_EXT_debug_report)
- Should add to dlls/vulkan-1/tests for a simple usage of tagging an object (similar to the private data test). Maybe a small companion layer that just plainly prints out debug information would also be of use.
Connecting to these applications via a graphics debugging tool should yield Vulkan debug information from the application.
Some potential challenges that may be hit:
- Implementation of debug utils messenger callback in concern with calling-convention and alignment
- make_vulkan currently notes interaction issues with VK_EXT_debug_marker and VK_EXT_debug_utils and implementations within LunarG's vulkan-1.dll, we may wish to conditionally expose this functionality either via a regkey, or if we detect WINE's vulkan-1.dll implementation is in use.
Helpful links: - https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT... - https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT... - https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT...
https://bugs.winehq.org/show_bug.cgi?id=49813
Georg Lehmann dadschoorseapi@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dadschoorseapi@gmail.com
--- Comment #1 from Georg Lehmann dadschoorseapi@gmail.com --- I'm working on an implementation for this.
I think I found a way to implement calling convention conversion for the callback calls, by using the user data parameter to store a the applications callback + data and unwraping that in a general function.
But additionally those callbacks get the effected handle(s) as an argument.
This is major issue since winevulkan wraps some handles (VkCommandBuffer VkDevice VkInstance VkCommandPool VkPhysicalDevice VkQueue).
We need to somehow get the wrapper from a native handle. Otherwise we would return invalid handles to the application running in wine.
I see no easy way that fix this, other than to store a mapping of the effected handles per instance. This could be enabled only if an effected extension is activated.
A simpler alternative would be to fallback to the instance as the reporting object, although I'm not sure if this couldn't cause other issues.
Either way, there might also be the handle in the message string itself, but I strongly hope no application uses that for anything other than logging.
https://bugs.winehq.org/show_bug.cgi?id=49813
Liam Middlebrook loothelion@nvidia.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Version|unspecified |5.20
--- Comment #2 from Liam Middlebrook loothelion@nvidia.com --- Closing fixed now that the following extensions have been implemented: - VK_EXT_debug_utils - VK_EXT_debug_report - VK_EXT_debug_marker
Fixed as of https://source.winehq.org/git/wine.git/commit/fc893489fe89c9fbd22f0cbe1c4327...
https://bugs.winehq.org/show_bug.cgi?id=49813
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |fc893489fe89c9fbd22f0cbe1c4 | |327c64f05e0dc
https://bugs.winehq.org/show_bug.cgi?id=49813
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.21.