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

Added ability to override VK_LOADER_LAYERS_DISABLE env var. #4588

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

Conversation

aleiby
Copy link
Contributor

@aleiby aleiby commented Jan 6, 2025

When testing against an old Unity app on Windows, I discovered someone was setting VK_LOADER_LAYERS_DISABLE=implicit which was preventing me from using RenderDoc to compare DX11 vs Vulkan output. Since dxvk is right in the middle of all of this, it provides an opportune place to fix that.

Copy link
Owner

@doitsujin doitsujin left a comment

Choose a reason for hiding this comment

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

I'm fine with this change overall since it's a debug band-aid, just needs a fix for native builds.

#ifdef _WIN32
::SetEnvironmentVariableA(name, value);
#else
std::setenv(name, value);
Copy link
Owner

Choose a reason for hiding this comment

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

This doesn't exist in the std namespace and has an extra parameter.

I'd be fine with printing a warning and not supporting this in native builds at all for the time being; apps using dxvk-native shouldn't be messing around with the Vulkan environment in the first place and we can still add it later if it does turn out to be needed.

Otherwise, we'd need to explicitly include posix headers here and also make sure it behaves the same as the Windows path (mostly relevant for handling the value == nullptr case, but also unicode considerations).

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.

2 participants