doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
13.04k stars 836 forks source link

MultiGPU Conflict #376

Closed Enverex closed 6 years ago

Enverex commented 6 years ago

When I start a game, DXVK spits out info regarding both my Intel iGPU and the Nvidia card (1060, driver 396.24) in the machine. The Intel iGPU isn't actually used normally but it's left on as I use it for video encoding.

DXVK seems to get confused when it starts up and lists information for both devices. I assumed this was just an info dump and the relevant card was used as games that should work with DXVK, did. Until I ran into one that didn't.

e.g. Starting Trials Evolution results in this output from DXVK specifically:

info:  Enabled instance layers:
info:  Enabled instance extensions:
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT".
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT".
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT".
info:  Intel(R) Iris Pro 6200 (Broadwell GT3e):
info:    Driver: 18.0.3
info:    Vulkan: 1.0.57
info:    Memory Heap[0]:
info:      Size: 4737 MiB
info:      Flags: 0x1
info:      Memory Type[0]: Property Flags = 0xf
info:    Memory Heap[1]:
info:      Size: 1024 MiB
info:      Flags: 0x1
info:      Memory Type[1]: Property Flags = 0xf
info:  GeForce GTX 1060 6GB:
info:    Driver: 396.24.0
info:    Vulkan: 1.1.70
info:    Memory Heap[0]:
info:      Size: 6144 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:      Memory Type[8]: Property Flags = 0x1
info:    Memory Heap[1]:
info:      Size: 5761 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[9]: Property Flags = 0x6
info:      Memory Type[10]: Property Flags = 0xe
info:  D3D11CoreCreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CoreCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
warn:  Vulkan extension VK_EXT_vertex_attribute_divisor not supported
warn:  Vulkan extension VK_KHR_maintenance2 not supported
info:  Enabled device extensions:
info:    VK_KHR_descriptor_update_template
info:    VK_KHR_sampler_mirror_clamp_to_edge
info:    VK_KHR_maintenance1
info:    VK_KHR_shader_draw_parameters
info:    VK_KHR_swapchain
err:   DxvkSurface::createSurface: Surface not supported by device
err:   DXGI: DxgiSwapChain: Failed to create presenter or back buffer
err:   D3D11CreateDeviceAndSwapChain: Failed to create swap chain
warn:  D3D11CreateDevice: Unsupported driver type
info:  Enabled instance layers:
info:  Enabled instance extensions:
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT".
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT".
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT".
info:  Intel(R) Iris Pro 6200 (Broadwell GT3e):
info:    Driver: 18.0.3
info:    Vulkan: 1.0.57
info:    Memory Heap[0]:
info:      Size: 4737 MiB
info:      Flags: 0x1
info:      Memory Type[0]: Property Flags = 0xf
info:    Memory Heap[1]:
info:      Size: 1024 MiB
info:      Flags: 0x1
info:      Memory Type[1]: Property Flags = 0xf
info:  GeForce GTX 1060 6GB:
info:    Driver: 396.24.0
info:    Vulkan: 1.1.70
info:    Memory Heap[0]:
info:      Size: 6144 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:      Memory Type[8]: Property Flags = 0x1
info:    Memory Heap[1]:
info:      Size: 5761 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[9]: Property Flags = 0x6
info:      Memory Type[10]: Property Flags = 0xe
info:  D3D11CoreCreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CoreCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
warn:  Vulkan extension VK_EXT_vertex_attribute_divisor not supported
warn:  Vulkan extension VK_KHR_maintenance2 not supported
info:  Enabled device extensions:
info:    VK_KHR_descriptor_update_template
info:    VK_KHR_sampler_mirror_clamp_to_edge
info:    VK_KHR_maintenance1
info:    VK_KHR_shader_draw_parameters
info:    VK_KHR_swapchain
err:   DxvkSurface::createSurface: Surface not supported by device
err:   DXGI: DxgiSwapChain: Failed to create presenter or back buffer
err:   D3D11CreateDeviceAndSwapChain: Failed to create swap chain
warn:  D3D11CreateDevice: Unsupported driver type
info:  Enabled instance layers:
info:  Enabled instance extensions:
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT".
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT".
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT".
info:  Intel(R) Iris Pro 6200 (Broadwell GT3e):
info:    Driver: 18.0.3
info:    Vulkan: 1.0.57
info:    Memory Heap[0]:
info:      Size: 4737 MiB
info:      Flags: 0x1
info:      Memory Type[0]: Property Flags = 0xf
info:    Memory Heap[1]:
info:      Size: 1024 MiB
info:      Flags: 0x1
info:      Memory Type[1]: Property Flags = 0xf
info:  GeForce GTX 1060 6GB:
info:    Driver: 396.24.0
info:    Vulkan: 1.1.70
info:    Memory Heap[0]:
info:      Size: 6144 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:      Memory Type[8]: Property Flags = 0x1
info:    Memory Heap[1]:
info:      Size: 5761 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[9]: Property Flags = 0x6
info:      Memory Type[10]: Property Flags = 0xe
info:  D3D11CoreCreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CoreCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
warn:  Vulkan extension VK_EXT_vertex_attribute_divisor not supported
warn:  Vulkan extension VK_KHR_maintenance2 not supported
info:  Enabled device extensions:
info:    VK_KHR_descriptor_update_template
info:    VK_KHR_sampler_mirror_clamp_to_edge
info:    VK_KHR_maintenance1
info:    VK_KHR_shader_draw_parameters
info:    VK_KHR_swapchain
err:   DxvkSurface::createSurface: Surface not supported by device
err:   DXGI: DxgiSwapChain: Failed to create presenter or back buffer
err:   D3D11CreateDeviceAndSwapChain: Failed to create swap chain

(note the reference to both the 1060 and the Iris 6200)

So I uninstalled anything on my system related to Intel-Vulkan, low-and-behold, Trials Evolution started up just fine. The entire output this time was only:

info:  Enabled instance extensions:
info:    VK_KHR_surface
info:    VK_KHR_win32_surface
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT".
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT".
0041:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT".
info:  GeForce GTX 1060 6GB:
info:    Driver: 396.24.0
info:    Vulkan: 1.1.70
info:    Memory Heap[0]:
info:      Size: 6144 MiB
info:      Flags: 0x1
info:      Memory Type[7]: Property Flags = 0x1
info:      Memory Type[8]: Property Flags = 0x1
info:    Memory Heap[1]:
info:      Size: 5761 MiB
info:      Flags: 0x0
info:      Memory Type[0]: Property Flags = 0x0
info:      Memory Type[1]: Property Flags = 0x0
info:      Memory Type[2]: Property Flags = 0x0
info:      Memory Type[3]: Property Flags = 0x0
info:      Memory Type[4]: Property Flags = 0x0
info:      Memory Type[5]: Property Flags = 0x0
info:      Memory Type[6]: Property Flags = 0x0
info:      Memory Type[9]: Property Flags = 0x6
info:      Memory Type[10]: Property Flags = 0xe
info:  D3D11CoreCreateDevice: Probing D3D_FEATURE_LEVEL_11_0
info:  D3D11CoreCreateDevice: Using feature level D3D_FEATURE_LEVEL_11_0
warn:  Vulkan extension VK_EXT_vertex_attribute_divisor not supported
warn:  Vulkan extension VK_KHR_maintenance2 not supported
info:  Enabled device extensions:
info:    VK_KHR_descriptor_update_template
info:    VK_KHR_sampler_mirror_clamp_to_edge
info:    VK_KHR_maintenance1
info:    VK_KHR_shader_draw_parameters
info:    VK_KHR_swapchain
warn:  DXGI: MakeWindowAssociation: Ignoring flags

So yeah. I'm not sure if it's trying to use the wrong device, mixing details of both together, etc.

On a tangently related note, the output above says VK_KHR_maintenance2 isn't supported, but according to the driver, it should be. Same with VK_EXT_vertex_attribute_divisor.

cirk2 commented 6 years ago

You can pre select the device to use like this export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
I noticed the VK_KHR_maintenance2 and VK_EXT_vertex_attribute_divisor missing on mesa-git, not sure if it has any impact currently

doitsujin commented 6 years ago

DXVK doesn't get confused and supports multiple devices just fine, this is not really a bug - it's just that your Intel GPU doesn't support presentation (which kind of makes sense if you're not using it).

Thing is, there's no way for me to know that in advance so I'd recommend using the VK_ICD_FILENAMES workaround for now.

doitsujin commented 6 years ago

Please test if this works with 40b52758e3240700b061dd9650986a1312c9099f.

Enverex commented 6 years ago

Sorry, didn't get a chance to test it last night. Will test tonight for you (~7 hours from now).

Leopard1907 commented 6 years ago

@doitsujin I think i have a similar issue.

Skyrim SE is the game i'm trying , that is the only game i'm trying with DXVK:

Game hangs on loading screen with animated dragon logo and smokes.

0019:fixme:mountmgr:harddisk_ioctl The DISK_PARTITION_INFO and DISK_DETECTION_INFO structures will not be filled 0019:fixme:mountmgr:harddisk_ioctl The DISK_PARTITION_INFO and DISK_DETECTION_INFO structures will not be filled 0019:fixme:mountmgr:harddisk_ioctl The DISK_PARTITION_INFO and DISK_DETECTION_INFO structures will not be filled 0019:fixme:mountmgr:harddisk_ioctl The DISK_PARTITION_INFO and DISK_DETECTION_INFO structures will not be filled 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkCreateDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDestroyDebugReportCallbackEXT". 00a4:fixme:vulkan:wine_vkGetInstanceProcAddr Unsupported device or instance function: "vkDebugReportMessageEXT".

lspci | egrep 'VGA|3D|Display' 00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04) 01:00.0 3D controller: NVIDIA Corporation Device 1c8d (rev a1)

inxi -SMGxx System: Host: asus-FX553VD Kernel: 4.15.3-041503-generic x86_64 (64 bit gcc: 7.2.0) Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3) dm: lightdm Distro: Linux Mint 18.3 Sylvia Machine: System: ASUSTeK (portable) product: GL553VD v: 1.0 Mobo: ASUSTeK model: GL553VD v: 1.0 Bios: American Megatrends v: GL553VD.304 date: 09/07/2017 Graphics: Card-1: Intel Device 591b bus-ID: 00:02.0 chip-ID: 8086:591b Card-2: NVIDIA Device 1c8d bus-ID: 01:00.0 chip-ID: 10de:1c8d Display Server: X.Org 1.19.5 driver: nvidia Resolution: 1920x1080@60.01hz GLX Renderer: GeForce GTX 1050/PCIe/SSE2 GLX Version: 4.6.0 NVIDIA 396.24 Direct Rendering: Yes

Intel HD 520 and GTX 1050.

Note that ; with normal Wine Staging 3.8 i can play Doom 2016 on Vulkan so Vulkan works there i'm sure.

Enverex commented 6 years ago

@doitsujin That commit seems to have fixed it. Thanks. (the workaround of specifying the ICD specifically work worked fine)

Kerrung commented 6 years ago

@Enverex, maybe you should close it?

Enverex commented 6 years ago

Good idea!