Skip to content

loader: Skip layer when interface negotiation fails - #2027

Closed
herlience wants to merge 1 commit into
KhronosGroup:mainfrom
herlience:skip-layer-when-interface-negotiation-fails
Closed

loader: Skip layer when interface negotiation fails#2027
herlience wants to merge 1 commit into
KhronosGroup:mainfrom
herlience:skip-layer-when-interface-negotiation-fails

Conversation

@herlience

Copy link
Copy Markdown
Contributor

If a layer's vkNegotiateLoaderLayerInterfaceVersion call fails
(e.g. returns VK_ERROR_INITIALIZATION_FAILED), the loader was
silently falling back to the legacy vkGetInstanceProcAddr path
and still activating the layer, instead of treating the failure
as fatal for that layer.

Add the missing else branch so a failed negotiation is treated
the same as a layer whose library failed to load: log it and
skip the layer with continue, rather than adding it to the
instance chain.

Fixes #1708

If a layer's vkNegotiateLoaderLayerInterfaceVersion call fails
(e.g. returns VK_ERROR_INITIALIZATION_FAILED), the loader was
silently falling back to the legacy vkGetInstanceProcAddr path
and still activating the layer, instead of treating the failure
as fatal for that layer.

Add the missing else branch so a failed negotiation is treated
the same as a layer whose library failed to load: log it and
skip the layer with continue, rather than adding it to the
instance chain.

Fixes KhronosGroup#1708
@ci-tester-lunarg

Copy link
Copy Markdown

Author herlience not on autobuild list. Waiting for curator authorization before starting CI build.

1 similar comment
@ci-tester-lunarg

Copy link
Copy Markdown

Author herlience not on autobuild list. Waiting for curator authorization before starting CI build.

@herlience

Copy link
Copy Markdown
Contributor Author

Closing this in favor of #2026 which addresses the same root cause
more comprehensively (also covers device chain and enumeration
edge cases)

@herlience herlience closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loader still adds a layer that fails negotation

2 participants