Skip to content

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

Open
@YueLu0116

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions