VulkanTools icon indicating copy to clipboard operation
VulkanTools copied to clipboard

vkconfig layer directory wrong for 32-bit programs with 64-bit windows

Open epajarre opened this issue 5 years ago • 3 comments

I am very new to Vulkan, so my apologies if I am missing something.

When testing I noticed that Vulkan configurator creates C:\Users\MyName\AppData\Local\LunarG\vkconfig\override\VkLayer_override.json which contains the override_paths section.

By default it seems to point on to the \VulkanSDK\1.2.162.1\Bin directory, which does not work if I have a 32bit Vulkan program.

I can use the Custom Layer Paths setting and change the path to Bin32, but of course then it won't work for 64bit binaries.

Am I missing some way to make both work?

epajarre avatar Feb 04 '21 11:02 epajarre

Hi,

it's true that I didn't even considered 32 bits Vulkan applications with Vulkan Configurator...

I am guessing that yes currently you need to add the custom path when you are using 32 bit Vulkan applications and remove it when you are using 64 bit Vulkan applications. Sure, it's clunky... 32 bits applications are quite a corner case these days so we are trying to evaluate how to prioritize this.

christophe-lunarg avatar Feb 04 '21 14:02 christophe-lunarg

In understand. I am "porting" an application from 32 bit world, so this sort of came up.

The custom path workaround exists, and my final target will most probably end up to be 64 bit. The only real problem for me was understanding the issue originally.

My current favorite idea for fixing this would be having optional "overrider_paths32", which would be used for 32 bit apps in case it exists.

epajarre avatar Feb 04 '21 17:02 epajarre

Hi,

32 bit layers still don't work with vkconfig. It would be nice to have it when debugging DXVK or similar projects. Could you at least fix it in a way that SDK 32-bit layers work?

Right now I do it manually:

Tested with SDK 1.3.250 today on Windows, and vkconfig creates Following Regeys: Under: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\ImplicitLayers DWORD C:\Users\USER\AppData\Local\LunarG\vkconfig\override\VkLayer_override.json Under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\Settings DWORD C:\Users\USER\AppData\Local\LunarG\vkconfig\override\vk_layer_settings.txt

To make it work with 32bit layers optionally installed by SDK, I had to

  1. Copy those two keys to corresponding WOW6432Node subkey
  2. In WOW6432Node\Khronos\Vulkan\ImplicitLayers rename VkLayer_override.json to VkLayer_override32.json
  3. Copy AppData\Local\LunarG\vkconfig\override\VkLayer_override.json file to AppData\Local\LunarG\vkconfig\override\VkLayer_override32.json
  4. Append 32 to override_paths inside VkLayer_override32.json

Unfortunately, to disable layers added this way, you have to rename added regkey (the one pointing to VkLayer_override32.json in WOW6432Node\Khronos\Vulkan\ImplicitLayers) to point it to non-existing file.

Any change to enabled layers in vkconfig means you also have to copy VkLayer_override.json to VkLayer_override32.json and change path in it again.

Above steps seems to be easily implementable in vkconfig.

Custom layers working may be a little bit trickier to implement without filename or folder structure convention. Example:

  1. Renderdoc uses: RenderDoc_v1.26.0_64\renderdoc.json RenderDoc_v1.26.0_64\x86\renderdoc.json
  2. Steam Overlay/Fossilize: C:\Program Files (x86)\Steam\SteamOverlayVulkanLayer64.json C:\Program Files (x86)\Steam\SteamOverlayVulkanLayer.json

dorian-apanel-intel avatar May 31 '23 11:05 dorian-apanel-intel

32 bit is officially not supported anymore by the Vulkan SDK so closing.

christophe-lunarg avatar Jan 23 '25 18:01 christophe-lunarg