KhronosGroup / KhronosGroup/Vulkan-Loader
Vulkan loader does not support unicode strings in ImplicitLayers registry
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 696
- Forks
- 343
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 17
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in loader_windows.c around line 430, where registry keys and values are opened and enumerated. Reproduce the failure with the provided Chinese path and inspect how the Windows registry APIs handle the char buffers. Done means an ImplicitLayers manifest with Unicode characters in its path loads correctly without garbled output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- computer-graphics, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100