-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Using a multicontext version of glad to prepare for multi GPU support. #10118
Using a multicontext version of glad to prepare for multi GPU support. #10118
Conversation
Let me add some information to the changes in this pull request: For multi-GPU support we need to load Vulkan functions for each device in use which doesn't allow us to use a global context that is usually created by GLAD anymore. Instead, multiple Since calling functions requires using the I also removed the dynamic module handling code in The biggest part of the diff is the auto-generated |
90765a6
to
d32c516
Compare
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.
For the most part these changes look good to me. Are you able to test AtomSampleViewer and run the full test suite to ensure none of the existing functionality is broken?
Having updated both We are testing on Linux and with Clang 13.0.1. |
I added a bug report at the |
d32c516
to
7f5ade6
Compare
Any progress on this @moudgils? I just updated to the latest development branch. @kh-huawei just tried to run the test suite of AtomSampleViewer with it on Windows and everything worked. |
Ahh. As long as the full test suite runs correctly for Vk we should be good to check this in. I will approve it and start AR for it. |
There are a few issues with this PR as flagged by the AR run. Please go ahead and address them so that the AR run passes - https://jenkins.build.o3de.org/job/O3DE/view/change-requests/job/PR-10118/ |
Refactoring all Vulkan calls to use the device context. Signed-off-by: Joerg H. Mueller <[email protected]>
7f5ade6
to
5b77bc6
Compare
The update should fix those issues. I assume you need to trigger another run, or does it run automatically? |
@jhmueller-huawei This PR is causing runtime crash for Android. Specifically the call to SetDebugUtilsObjectNameEXT is seg-faulting. Are you able to look into this? An engineer (internally) is looking into it but we may decide to revert this PR until the cause of the issue is identified/resolved. |
Unfortunately, not really. I also don't have any idea why this call would crash, since it's just one of the many function calls that now go through the context instead of a global that is set by glad. It is of course a function provided by an extension, so maybe the issue is with the extension management in glad on Android. |
…glad context (#11151) Signed-off-by: moraaar <[email protected]> ## What does this PR do? Fixes `VK_EXTENSION_SUPPORTED` macro to check at runtime if a vulkan extension is supported or not. Glad vulkan checks each extension availability at runtime (when loaded) and saves it in global int variables `GLAD_VK_EXT_extensionname`. PR #10118 changed this so it checks if a macro `VK_EXT_...` is 1, which it always is, but it's not checking at runtime if the device/instance has support for the extension. So what's happening is that on android it now thinks extension `EXT_debug_utils` is available, which is not, and then it crashes when calling `CreateDebugUtilsMessengerEXT`. With the new glad vulkan header introduced in PR #10118 instead of checking `GLAD_VK_EXT_extensionname` it should be checking `context.EXT_extensionname` int instead. ## How was this PR tested? Run default level using vulkan rhi on pc and android.
…#9) Removed duplicated function glad loader code and using Atom_RHI_Vulkan.Glad.Static instead. Fixed compilation issues after glad vulkan header was updated to use multi-context in Vulkan gem (o3de/o3de#10118) Built with latest O3DE using AtomSampleViewer project (openxr branch). RHI VR Sample works with Quest 2 via link cable. Fixes #7 Signed-off-by: moraaar <[email protected]>
…#9) Removed duplicated function glad loader code and using Atom_RHI_Vulkan.Glad.Static instead. Fixed compilation issues after glad vulkan header was updated to use multi-context in Vulkan gem (o3de/o3de#10118) Built with latest O3DE using AtomSampleViewer project (openxr branch). RHI VR Sample works with Quest 2 via link cable. Fixes o3de#7 Signed-off-by: moraaar <[email protected]>
Refactoring all Vulkan calls to use the device context.
Signed-off-by: Joerg H. Mueller [email protected]