cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

cospp
Journeyman III

How the VK_LAYER_AMD_switchable_graphics is supposed to work?

I have a laptop with Intel 620 and extenal RX 580 in Akitio Node Thunderbolt 3 case. When connecting eGPU and running vulkaininfo only the Intel 620 gpu is enumerated and then I get an error: vulkaninfo.h:881: failed with ERROR_INITIALIZATION_FAILED while enumerating device groups.

OS: Windows 10

AMD drivers tried: 19.11.3, 19.9.2, 19.6.2

Vulkaninfo SDK versions: 1.1.126, 1.1.123, 1.1.106 (report the same error at different source locations)

However when setting DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1 environment variable both GPUs are reported by vulkaninfo without errors.

I can provide both good and faulty vulkaninfo reports if necessary.

So the question is: Is reporting a single GPU with VK_LAYER_AMD_switchable_graphics is an intended behaviour? If so, I will report the issue to Vulkan Loader developers.

Reporting a single GPU while having multiple usable GPUs seems odd to me, as I can no longer choose GPU in my application as well as use multiple GPUs without settings this variable.

Also both GPUs are enumerated as OpenCL devices with or without setting the variable.

Any other information about VK_LAYER_AMD_switchable_graphics is appreciated (I couldn't find any developer related info)

EDIT: PS: May I have this question posted in appropriate "OpenGL & Vulkan" devs forum?

Tags (1)
0 Likes
Reply
9 Replies
dipak
Staff
Staff

Re: How the VK_LAYER_AMD_switchable_graphics is supposed to work?

Hi cospp‌,

Thank you for your query. I've whitelisted you and moved this post to the "OpenGL & Vulkan" forum.

Thanks.

0 Likes
Reply
dorisyan
Staff
Staff

Re: How the VK_LAYER_AMD_switchable_graphics is supposed to work?

Hi cospp‌, Does this app works well on NV's platform?

If it is, could you please provide a minimal code which can reproduce this problem?

0 Likes
Reply
cospp
Journeyman III

Re: How the VK_LAYER_AMD_switchable_graphics is supposed to work?

I can reproduce it simply by running vulkaninfo64.exe from the AMD driver folder. Here is the output:

Microsoft Windows [Version 10.0.18362.535]
(c) 2019 Microsoft Corporation. All rights reserved.

c:\Windows\System32\DriverStore\FileRepository\u0346830.inf_amd64_35731e557194973d\B345901>vulkaninfo64.exe
==========
VULKANINFO
==========

Vulkan Instance Version: 1.1.106

Instance Extensions:
====================
Instance Extensions count = 11
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 1
VK_EXT_swapchain_colorspace : extension revision 4
VK_KHR_device_group_creation : extension revision 1
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities: extension revision 1
VK_KHR_get_physical_device_properties2: extension revision 1
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_win32_surface : extension revision 6
Layers: count = 8
=======
VK_LAYER_AMD_switchable_graphics (AMD switchable graphics layer) Vulkan version 1.1.108, layer version 1
Layer Extensions count = 0
Devices count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions count = 0

VK_LAYER_KHRONOS_validation (Khronos Validation Layer) Vulkan version 1.1.126, layer version 1
Layer Extensions count = 3
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 1
VK_EXT_validation_features : extension revision 2
Devices count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions count = 2
VK_EXT_debug_marker : extension revision 4
VK_EXT_validation_cache : extension revision 1

VK_LAYER_LUNARG_api_dump (LunarG API dump layer) Vulkan version 1.1.126, layer version 2
Layer Extensions count = 0
Devices count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions count = 0

VK_LAYER_LUNARG_device_simulation (LunarG device simulation layer) Vulkan version 1.1.126, layer version 1
Layer Extensions count = 0
Devices count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions count = 0

VK_LAYER_LUNARG_monitor (Execution Monitoring Layer) Vulkan version 1.1.126, layer version 1
Layer Extensions count = 0
Devices count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions count = 0

VK_LAYER_LUNARG_screenshot (LunarG image capture layer) Vulkan version 1.1.126, layer version 1
Layer Extensions count = 0
Devices count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions count = 0

VK_LAYER_LUNARG_standard_validation (LunarG Standard Validation) Vulkan version 1.1.126, layer version 1
Layer Extensions count = 3
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 1
VK_EXT_validation_features : extension revision 2
Devices count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions count = 2
VK_EXT_debug_marker : extension revision 4
VK_EXT_validation_cache : extension revision 1

VK_LAYER_LUNARG_vktrace (Vktrace tracing library) Vulkan version 1.1.126, layer version 1
Layer Extensions count = 0
Devices count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions count = 0

Presentable Surfaces:
=====================
GPU id : 0 (Intel(R) UHD Graphics 620)
Surface type : VK_KHR_win32_surface
Formats: count = 4
B8G8R8A8_UNORM
B8G8R8A8_SRGB
R8G8B8A8_UNORM
R8G8B8A8_SRGB
Present Modes: count = 2
IMMEDIATE_KHR
FIFO_KHR
VkSurfaceCapabilitiesKHR:
minImageCount = 2
maxImageCount = 64
currentExtent:
width = 256
height = 256
minImageExtent:
width = 256
height = 256
maxImageExtent:
width = 256
height = 256
maxImageArrayLayers = 2048
supportedTransform:
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
currentTransform:
VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR
supportedCompositeAlpha:
VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR
VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR
supportedUsageFlags:
VK_IMAGE_USAGE_TRANSFER_SRC_BIT
VK_IMAGE_USAGE_TRANSFER_DST_BIT
VK_IMAGE_USAGE_SAMPLED_BIT
VK_IMAGE_USAGE_STORAGE_BIT
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT

C:\VulkanSDKBuild\workspace\Khronos-Tools\repo\vulkaninfo\vulkaninfo.c:5780: failed with VK_ERROR_INITIALIZATION_FAILED

0 Likes
Reply
dorisyan
Staff
Staff

Re: How the VK_LAYER_AMD_switchable_graphics is supposed to work?

It can works well on my local machine, could you please provide some info about your graphics card and os.

Maybe you can also try to update your vk sdk version to "Vulkan Instance Version: 1.1.114"

0 Likes
Reply
cospp
Journeyman III

Re: How the VK_LAYER_AMD_switchable_graphics is supposed to work?

Here is the output if I set DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
c:\Windows\System32\DriverStore\FileRepository\u0346830.inf_amd64_35731e55719497 - Pastebin.com 

Here is the output if I put GTX980 into eGPU case:

c:\Windows\System32\DriverStore\FileRepository\u0346830.inf_amd64_35731e557194 - Pastebin.com 

0 Likes
Reply
cospp
Journeyman III

Re: How the VK_LAYER_AMD_switchable_graphics is supposed to work?

And the question still is: What is VK_LAYER_AMD_switchable_graphics and what it is supposed to do?

0 Likes
Reply
cospp
Journeyman III

Re: How the VK_LAYER_AMD_switchable_graphics is supposed to work?

Here is the output from vulkaninfo from VulkanSDK 1.1.126

c:\Projects\VulkanSDK\1.1.126.0\RunTimeInstaller\x64>vulkaninfo.exe
==========
VULKANINFO
==========

Vulkan Instance Version: 1.1.126


Instance Extensions: count = 11
====================
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 1
VK_EXT_swapchain_colorspace : extension revision 4
VK_KHR_device_group_creation : extension revision 1
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 1
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_win32_surface : extension revision 6

Layers: count = 8
=======
VK_LAYER_AMD_switchable_graphics (AMD switchable graphics layer) Vulkan version 1.1.108, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions: count = 0

VK_LAYER_KHRONOS_validation (Khronos Validation Layer) Vulkan version 1.1.126, layer version 1:
Layer Extensions: count = 3
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 1
VK_EXT_validation_features : extension revision 2
Devices: count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions: count = 2
VK_EXT_debug_marker : extension revision 4
VK_EXT_validation_cache : extension revision 1

VK_LAYER_LUNARG_api_dump (LunarG API dump layer) Vulkan version 1.1.126, layer version 2:
Layer Extensions: count = 0
Devices: count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions: count = 0

VK_LAYER_LUNARG_device_simulation (LunarG device simulation layer) Vulkan version 1.1.126, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions: count = 0

VK_LAYER_LUNARG_monitor (Execution Monitoring Layer) Vulkan version 1.1.126, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions: count = 0

VK_LAYER_LUNARG_screenshot (LunarG image capture layer) Vulkan version 1.1.126, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions: count = 0

VK_LAYER_LUNARG_standard_validation (LunarG Standard Validation) Vulkan version 1.1.126, layer version 1:
Layer Extensions: count = 3
VK_EXT_debug_report : extension revision 9
VK_EXT_debug_utils : extension revision 1
VK_EXT_validation_features : extension revision 2
Devices: count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions: count = 2
VK_EXT_debug_marker : extension revision 4
VK_EXT_validation_cache : extension revision 1

VK_LAYER_LUNARG_vktrace (Vktrace tracing library) Vulkan version 1.1.126, layer version 1:
Layer Extensions: count = 0
Devices: count = 1
GPU id : 0 (Intel(R) UHD Graphics 620)
Layer-Device Extensions: count = 0

Presentable Surfaces:
=====================
GPU id : 0 (Intel(R) UHD Graphics 620):
Surface types: count = 1
VK_KHR_win32_surface
Formats: count = 4
SurfaceFormat[0]:
format = FORMAT_B8G8R8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[1]:
format = FORMAT_B8G8R8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[2]:
format = FORMAT_R8G8B8A8_UNORM
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
SurfaceFormat[3]:
format = FORMAT_R8G8B8A8_SRGB
colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
Present Modes: count = 2
PRESENT_MODE_IMMEDIATE_KHR
PRESENT_MODE_FIFO_KHR
VkSurfaceCapabilitiesKHR:
-------------------------
minImageCount = 2
maxImageCount = 64
currentExtent:
width = 256
height = 256
minImageExtent:
width = 256
height = 256
maxImageExtent:
width = 256
height = 256
maxImageArrayLayers = 2048
supportedTransforms:
SURFACE_TRANSFORM_IDENTITY_BIT_KHR
currentTransform:
SURFACE_TRANSFORM_IDENTITY_BIT_KHR
supportedCompositeAlpha:
COMPOSITE_ALPHA_OPAQUE_BIT_KHR
COMPOSITE_ALPHA_INHERIT_BIT_KHR
supportedUsageFlags:
IMAGE_USAGE_TRANSFER_SRC_BIT
IMAGE_USAGE_TRANSFER_DST_BIT
IMAGE_USAGE_SAMPLED_BIT
IMAGE_USAGE_STORAGE_BIT
IMAGE_USAGE_COLOR_ATTACHMENT_BIT
VkSurfaceCapabilities2EXT:
--------------------------
supportedSurfaceCounters:
None


Groups:
=======
c:\vulkansdkbuild\workspace\khronos-tools\repo\vulkaninfo\vulkaninfo.h:881: failed with ERROR_INITIALIZATION_FAILED

0 Likes
Reply
dorisyan
Staff
Staff

Re: How the VK_LAYER_AMD_switchable_graphics is supposed to work?

Hello, 

Switchable Graphics is a technology that utilizes both the graphical processing capabilities of a discrete graphics adapter and the power efficiency of an integrated graphics adapter.  Laptops equipped with Switchable Graphics are capable of engaging the higher performance discrete graphics adapter for 3D applications, and the energy-efficient integrated graphics adapter for less demanding tasks.

 

For more details, please refer to https://www.amd.com/zh-hans/support/kb/faq/dh-017 

--

Best Regards

Doris Yan

0 Likes
Reply
zinx
Adept II

Re: How the VK_LAYER_AMD_switchable_graphics is supposed to work?

FYI you removed the "Switchable Graphics" option from your latest driver interface.

Now you have to use Windows's GPU/Graphics options instead.

0 Likes
Reply