Skip to content
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

[vulkan] Dynamically load Vulkan loader library. Avoid Validation Layer crash on exit. #8289

Merged
merged 10 commits into from
Jun 23, 2024

Conversation

derek-gerstmann
Copy link
Contributor

@derek-gerstmann derek-gerstmann commented Jun 12, 2024

As suggested by @abadams , we should dynamically load the Vulkan loader library methods, and then use those to create an instance, rather than requiring a link-time dependency.

Also added runtime checks to verify the amount of shared memory required by the compiled pipeline is supported by the device. See #8288

Detect if VK_LAYER_KHRONOS_validation is enabled, and bypass the module destructor which calls halide_vulkan_device_release() to avoid a segfault (at the cost of leaking!). See: #8290.

Add vk_validate_shader_for_device() method to check shader bindings against device limits prior to compiling to verify shader compatibility. See: #8297 #8296 #8295 #8294 #8288

Derek Gerstmann added 3 commits June 12, 2024 15:21
…solve the instance methods dynamically.

Update the Vulkan readme to match the latest information regarding the SDK packages.
Derek Gerstmann added 3 commits June 13, 2024 15:51
destructor which calls halide_vulkan_device_release() to avoid a
segfault (at the cost of leaking!).  See
#8290.

Refactor and cleanup halide_vulkan_device_release().
Add vk_destroy_context() methods.
@derek-gerstmann derek-gerstmann changed the title [vulkan] Remove compile-time link dependency on the Vulkan loader library [vulkan] Dynamically load Vulkan loader library. Avoid Validation Layer crash on exit. Jun 13, 2024
@derek-gerstmann derek-gerstmann added bug dev_meeting Topic to be discussed at the next dev meeting labels Jun 13, 2024
@abadams abadams added this to the v18.0.0 milestone Jun 23, 2024
@abadams
Copy link
Member

abadams commented Jun 23, 2024

Is this good to merge? I don't remember the conclusion from the dev meeting.

@derek-gerstmann
Copy link
Contributor Author

Yes, this is good to merge and fixes most of the issues we were seeing.

@abadams abadams merged commit 5f6fc26 into main Jun 23, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dev_meeting Topic to be discussed at the next dev meeting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants