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

Vulkan loader does not support unicode strings in ImplicitLayers registry #1592

Open
YueLu0116 opened this issue Nov 12, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@YueLu0116
Copy link

Describe the bug
If ImplicitLayers' manifest paths containing Chinese characters (for example), they cannot be loaded.

Environment (please complete the following information):

  • OS: Windows 11
  • Bitdepth: 64-bit
  • GPU: NVIDIA GEFORCE RTX 3060 Ti
  • Graphics Driver: Nvidia 551.23
  • SDK or header version if building from repo:
  • Enabled layers:

To Reproduce
Steps to reproduce the behavior:
Just as titled

VK_LOADER_DEBUG output
Attach output when running with the environment variable VK_LOADER_DEBUG=all

ERROR:             	
loader_get_json: Failed to open JSON file D:\debug\测试\exec64d\SDKVulkanLayer64.json

Additional context
For example, the correct path is:
D:\debug\测试\exec64d\SDKVulkanLayer64.json

In loader_windows.c @430
key and name are typed with char array which means ASCII version APIs are used.

  while (*loc) {
      next = loader_get_next_path(loc);
      access_flags = KEY_QUERY_VALUE;
      rtn_value = RegOpenKeyEx(hive, loc, 0, access_flags, &key);
      if (ERROR_SUCCESS == rtn_value) {
          for (DWORD idx = 0;
               (rtn_value = RegEnumValue(key, idx++, name, &name_size, NULL, NULL, (LPBYTE)&value, &value_size)) == ERROR_SUCCESS;
          // ...
      } 
}

So I must set path as utf8 encoding in registry. Which looks like this in RegEditor (got garbled characters):
D:\debug\鏃笢\exec64d\SDKVulkanLayer64.json

@YueLu0116 YueLu0116 added the bug Something isn't working label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant