Skip to content

fix: handle multi-layer setting additions and fix settings equality checks#1882

Merged
charles-lunarg merged 2 commits into
KhronosGroup:mainfrom
JJLovesLife:main
Mar 20, 2026
Merged

fix: handle multi-layer setting additions and fix settings equality checks#1882
charles-lunarg merged 2 commits into
KhronosGroup:mainfrom
JJLovesLife:main

Conversation

@JJLovesLife

Copy link
Copy Markdown
Contributor

Fix deduplicate layer logic when multiple layers added by a single manifest in loader_add_layer_properties. Also fix missing fields in settings equality checks.

…hecks

Fix deduplicate layer logic when multiple layers added by a single manifest in `loader_add_layer_properties`.
Also fix missing fields in settings equality checks.
@ci-tester-lunarg

Copy link
Copy Markdown

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

1 similar comment
@ci-tester-lunarg

Copy link
Copy Markdown

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

@CLAassistant

CLAassistant commented Mar 19, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@JJLovesLife

Copy link
Copy Markdown
Contributor Author

I'm reading the Vulkan loader source code these days, and found some issues in the setting loading logic.

  1. loader_add_layer_properties may load multiple layers, and the deduplicate logic don't handle it correctly.
  2. setting equality check missed some fields, and update_global_loader_settings cleared global setting before compare. Let me know if you'd like just remove that logic.

Also let me know, if any test is needed in this change. And if an issue is needed.

@charles-lunarg

charles-lunarg commented Mar 19, 2026

Copy link
Copy Markdown
Collaborator

loader_add_layer_properties may load multiple layers, and the deduplicate logic don't handle it correctly.

Can you clarify what you mean? Yes, loader_add_layer_properties can add multiple layers as the manifest might have an array of layers. Is it that the deduplication logic occurs before any calls to loader_add_layer_properties are made, so if the manifest contains the same layer twice, it'll be added? Cause yeah, thats a bug, but its also a 'layer manifest authors, please don't do that ....' (I think I understand your statement, looking through the source code made it pretty clear, just wanted to confirm.)

update_global_loader_settings cleared global setting before compare. Let me know if you'd like just remove that logic.

That just sounds like a bug. Whoops!

Edit: Now that I did a code review - it seems both things are fixed in the PR. Thanks!

@charles-lunarg charles-lunarg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look to fix all the problems described.
Will approve it & let CI run, assuming it passes its should be good to go.

@ci-tester-lunarg

Copy link
Copy Markdown

CI Vulkan-Loader build queued with queue ID 685172.

@ci-tester-lunarg

Copy link
Copy Markdown

CI Vulkan-Loader build # 3455 running.

@charles-lunarg

Copy link
Copy Markdown
Collaborator

Oh FYI the code needs to be formatted with clang-format-16 in order to pass the CI check.

@ci-tester-lunarg

Copy link
Copy Markdown

CI Vulkan-Loader build # 3455 passed.

@ci-tester-lunarg

Copy link
Copy Markdown

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

1 similar comment
@ci-tester-lunarg

Copy link
Copy Markdown

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

@JJLovesLife

Copy link
Copy Markdown
Contributor Author

Oh FYI the code needs to be formatted with clang-format-16 in order to pass the CI check.

Oops, sorry I forgot to format the code😜 I've updated it now and should also resolved the testing failure.

@ci-tester-lunarg

Copy link
Copy Markdown

CI Vulkan-Loader build queued with queue ID 685993.

@ci-tester-lunarg

Copy link
Copy Markdown

CI Vulkan-Loader build # 3457 running.

@ci-tester-lunarg

Copy link
Copy Markdown

CI Vulkan-Loader build # 3457 passed.

@charles-lunarg charles-lunarg merged commit 3208d4b into KhronosGroup:main Mar 20, 2026
45 checks passed
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.

4 participants