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

Add loader enable/disable env vars #984

Merged

Conversation

MarkY-LunarG
Copy link
Collaborator

@MarkY-LunarG MarkY-LunarG commented Jul 26, 2022

Add new environment variables that will allow the loader to filter
layers and drivers in specific ways.
This control should give developers ways to more quickly narrow down
issues with a layer or driver.
Also, it should give CI environments a mechanism to selectively enable
only drivers and layers that are needed for testing.

Add tests to support validating the new changes.

Add documentation that describes the new changes.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Jul 26, 2022

CI Vulkan-Loader build queued with queue ID 3568.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Jul 26, 2022

CI Vulkan-Loader build # 1446 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Jul 26, 2022

CI Vulkan-Loader build # 1446 passed.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Aug 9, 2022

CI Vulkan-Loader build queued with queue ID 10712.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Aug 9, 2022

CI Vulkan-Loader build # 1455 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Aug 9, 2022

CI Vulkan-Loader build # 1455 passed.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Aug 11, 2022

CI Vulkan-Loader build queued with queue ID 12130.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Aug 11, 2022

CI Vulkan-Loader build # 1456 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Aug 11, 2022

CI Vulkan-Loader build # 1456 passed.

Copy link
Collaborator

@charles-lunarg charles-lunarg left a comment

Lots of small changes (mainly handling OOM and doing early-out for error paths).

I would like to have a go playing with this feature before putting it out there, just to make sure it works like I think it does.

docs/LoaderDebugging.md Outdated Show resolved Hide resolved
docs/LoaderDebugging.md Outdated Show resolved Hide resolved
docs/LoaderDebugging.md Outdated Show resolved Hide resolved
docs/LoaderDebugging.md Outdated Show resolved Hide resolved
docs/LoaderDebugging.md Show resolved Hide resolved
loader/loader.c Outdated Show resolved Hide resolved
loader/loader.c Outdated Show resolved Hide resolved
loader/loader.c Outdated Show resolved Hide resolved
loader/loader.c Show resolved Hide resolved
loader/loader.c Outdated Show resolved Hide resolved
@hadess
Copy link

hadess commented Sep 1, 2022

Looks like VK_LOADER_DRIVER_SELECT=intel_icd* would fix the vulkaninfo test case I submitted in #963, and work on both the host and Flatpak (given new enough version of the vulkan loader obviously).

I would however make sure in the docs to use "driver manifest filenames" consistently. "driver names" was used a couple of times even though the docs say "drivers don’t have a name".

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build queued with queue ID 24309.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build # 1483 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build # 1483 failed.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build queued with queue ID 24328.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build # 1484 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build # 1484 failed.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build queued with queue ID 24359.

@MarkY-LunarG
Copy link
Collaborator Author

MarkY-LunarG commented Sep 1, 2022

Rebased on latest master due to conflicts.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build # 1485 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build # 1485 failed.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build queued with queue ID 24396.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Sep 1, 2022

CI Vulkan-Loader build # 1488 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Oct 31, 2022

CI Vulkan-Loader build # 1589 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Oct 31, 2022

CI Vulkan-Loader build # 1589 passed.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 3, 2022

CI Vulkan-Loader build queued with queue ID 26475.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 3, 2022

CI Vulkan-Loader build # 1601 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 3, 2022

CI Vulkan-Loader build # 1601 failed.

MarkY-LunarG and others added 8 commits Nov 4, 2022
Add new environment variables that will allow the loader to filter
layers and drivers in specific ways.
This control should give developers ways to more quickly narrow down
issues with a layer or driver.
Also, it should give CI environments a mechanism to selectively enable
only drivers and layers that are needed for testing.

Add tests to support validating the new changes.

Add documentation that describes the new changes and also create new
loader debugging markdown document to help people debug issues with
drivers or layers using the new filter enums.

Rename the old get_environment.* source files to loader_environment.*.
Then put all the environment variable helpers from loader.c into the
new files.
Also remove duplication so that common code is used in several places.
TODO: Replace all 1.3.yyyy with appropriate header version after
approval.
When terminator_EnumerateDeviceExtensionProperties is called, the app
now only checks that the type flag is implicit rather than building up a new
list of implicit layers, as building a list could cause many suprious log
messages and was unecessary. This commit also removes some redundant copies &
for loops in the function.
This way users know exactly which version of the loader contains the
new environment variables.
Disabled layers would appear in the output of EnumerateInstanceLayers, which was
not intended. Move the removal of layers that are disabled by the env-var to after
the explicit layers are found.
The previous commit altered vkCreateInstance erroring out if the
application tries to enable an env-var disabled layer, so the tests
need to be revised for it. This commit also makes lot of modifications
to the tests in addition to that.

Also adds tests for when the override layer is present and when
implicit layer's enable-environment variables are present.
@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 4, 2022

CI Vulkan-Loader build queued with queue ID 27213.

Copy link
Collaborator

@charles-lunarg charles-lunarg left a comment

After much finagling, this is in a good shape to be merged.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 4, 2022

CI Vulkan-Loader build # 1604 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 4, 2022

CI Vulkan-Loader build # 1604 failed.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 4, 2022

CI Vulkan-Loader build queued with queue ID 27229.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 4, 2022

CI Vulkan-Loader build # 1605 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 4, 2022

CI Vulkan-Loader build # 1605 failed.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 4, 2022

CI Vulkan-Loader build queued with queue ID 27266.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 4, 2022

CI Vulkan-Loader build # 1606 running.

@ci-tester-lunarg
Copy link

ci-tester-lunarg commented Nov 4, 2022

CI Vulkan-Loader build # 1606 passed.

@charles-lunarg charles-lunarg merged commit 256a5e3 into KhronosGroup:master Nov 4, 2022
26 checks passed
@charles-lunarg charles-lunarg deleted the add_control_env_vars branch Nov 4, 2022
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.

None yet

4 participants