KhronosGroup / KhronosGroup/Vulkan-Loader

Check binary architecture before report Layer

Open
#1,690 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C
Stars
695
Forks
343
Avg merge
1d 1h
Merged PRs (30d)
17

Description

**What enhancement are you suggesting for the Vulkan Loader? Please describe in detail. **

Loader should check the binary validity against running architecture, i.e. layer with x86 library cannot be reported to x64 process and vice-sersa: x64 library should not be reported to x86 process.

**Is this specific to a single platform?**
Windows 10 x64

**Additional context**

After installing some application we've got a Vulkan CTS error like:

```
Test case 'dEQP-VK.info.instance_layers'..
Fail (Duplicate layer: VK_LAYER_1)
```

This actually happens due to the application registered the VK_LAYER_1 twice in the registry first is for x86 binary and second is for x64 binary. This actually I think may cause additional troubles when application will try to enable the layer: it is unclear which binary load attempt will be made. I think Loader should remove invalid for process layers, i.e. layer with x86 library cannot be reported to x64 process and vice-sersa: x64 library should not be reported to x86 process.

I know that this is a mistake of app that it put both binaries into registry key Computer\HKEY_CURRENT_USER\Software\Khronos\Vulkan\ImplicitLayers, but I think it will improve Loader robustness making this basic validation.

Contributor guide

Open the contributing guide

Research direction

Start with the Vulkan Loader's Windows layer discovery and the Computer\HKEY_CURRENT_USER\Software\Khronos\Vulkan\ImplicitLayers registry entries. Reproduce the duplicate x86/x64 registration for a Windows 10 x64 process, then use dEQP-VK.info.instance_layers to verify that the mismatched architecture is not reported and the duplicate layer is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.