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

Document DISABLE_VKBASALT environment variable in README #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link

@Calinou Calinou commented Jan 18, 2023

This is useful to disable vkBasalt for a specific application when vkBasalt is globally enabled on the system. This specifically avoids issues in situations where environment variables cannot be unset or overridden for some reason.

See godotengine/godot#71515 (comment) where we discovered this environment variable by chance 🙂

This is useful to disable vkBasalt for a specific application
when vkBasalt is globally enabled on the system. This specifically
avoids issues in situations where environment variables cannot
be unset or overridden for some reason.
@akien-mga
Copy link

akien-mga commented Jan 19, 2023

To be fair, I'm not sure this is meant to be used by end users. In the Godot PR you linked, this makes the assumption that users aren't actually using this environment variable, but use ENABLE_VKBASALT=(1|0) to enable or disable the layer.

The DISABLE_* variables read by VkBasalt, MangoHud and RTSS seem more intended for application developers like Godot to force disable things which will not work properly, overriding the user's potential request.

So while I think it's good to document, I'm not sure this should be documented here / as a user-facing option to turn off an always-on VkBasalt (ENABLE_VKBASALT=0 yourgame should still work for this use case).

@pchome
Copy link
Contributor

pchome commented Feb 23, 2023

https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderLayerInterface.md#layer-manifest-file-format (see table)

For implicit layers "disable_environment" is required. Usually prefixed with DISABLE_, but may vary (also between layer versions, e.g. some layers add _1 at the end). To be sure user should check layer manifest. Can be set to any non-empty string value.

See $ grep -A2 disable_environment {~/.local,/usr}/share/vulkan/implicit_layer.d/*

For implicit layers "enable_environment" is optional, when not defined implicit layer will always load. When defined implicit layer will load only when "set to the given value", which mean ENABLE_VKBASALT=0 have no effect.

If both the "enable_environment" and "disable_environment" variables are set, the implicit layer is disabled.

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.

3 participants