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

[imgui] vulkan-binding but with dynamic function loading #36453

Open
qbojj opened this issue Jan 29, 2024 · 5 comments
Open

[imgui] vulkan-binding but with dynamic function loading #36453

qbojj opened this issue Jan 29, 2024 · 5 comments
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@qbojj
Copy link
Contributor

qbojj commented Jan 29, 2024

Is your feature request related to a problem? Please describe.

imgui port exposes vulkan-binding but it uses static function loading. Because of this I have encountered some very hard to diagnose errors (device losses) (that is probably because I have my system configured badly).

Proposed solution

Add something like vulkan-binding-no-prototypes that compiles vulkan-bindings but with added preprocessor flag VK_NO_PROTOTYPES (it should be declared as private)

Describe alternatives you've considered

modify the vulkan-bindings but it would be a breaking change as when compiling with VK_NO_PROTOTYPES , imgui requires a call to ImGui_ImplVulkan_LoadFunctions

Additional context

No response

@qbojj qbojj added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jan 29, 2024
@JonLiu1993
Copy link
Member

@qbojj, thank you for posting this issue, could you please provide more information according to your needs, I am still a little confused about this feature.

@qbojj
Copy link
Contributor Author

qbojj commented Feb 7, 2024

Essentially, Imgui_ImplVulkan normally links with a dynamic library (Vulkan loader) by default. However, there's an option called IMGUI_IMPL_VULKAN_NO_PROTOTYPES that makes it utilize dynamically loaded functions through the ImGui_ImplVulkan_LoadFunctions function, which is a standard practice for Vulkan libraries.

The issue arose when I was using SDL_Vulkan_GetVkGetInstanceProcAddr alongside a debugging tool that was injecting itself into the get-proc-addr. In this scenario, Imgui was utilizing a non-injected version of vulkan, causing some problems.

To address this, I would expect there to be a second port that also defines the IMGUI_IMPL_VULKAN_NO_PROTOTYPES , ensuring consistency and compatibility with the rest of the program.

Copy link

github-actions bot commented Aug 7, 2024

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

@github-actions github-actions bot added the Stale label Aug 7, 2024
@qbojj
Copy link
Contributor Author

qbojj commented Aug 7, 2024

.

@vicroms
Copy link
Member

vicroms commented Nov 25, 2024

Due to the nature of this feature being an "alternative" (features that cannot be installed at the same time) which causes the dependency tree to bifurcate in a conflicting way. It isn't possible to implement it in the curated registry. The best option for you would be to create overlay ports for vulkan-bindings and imgui that disable prototypes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

No branches or pull requests

3 participants