#3628·bgfx

由于 2 个 NVIDIA RTX2080 (同一设备 ID 和供应商 ID) 导致 Vulkan 初始化失败

作者: SamirAroudj创建于 2026年3月10日更新于 2026年3月11日
标签bug

**Describe the bug** Vulkan initialization in bgfx::init() fails. Tldr: The code chooses the GPU which is not able to render to a surface. I wanted to circumvent the issue by specifying the GPU to be used, however, that is not directly possible. The GPU ID and vendor ID are the same for both NVIDIA RTX 2080 GPUs. Here is the log output of the found devices after querying the Vulkan API (with my own code): [2.67033s][Info]: Rendering::Device::findDevices(): Found 3 devices: Device(NVIDIA GeForce RTX 2080, ID: 7810, vendorID: 4318, physicalType: discrete GPU, canRender: 1) Device(llvmpipe (LLVM 20.1.2, 256 bits), ID: 0, vendorID: 65541, physicalType: CPU, canRender: 1) Device(NVIDIA GeForce RTX 2080, ID: 7810, vendorID: 4318, physicalType: discrete GPU, canRender: 0) Unfortunately, vendorID is the same for both GPUs (from props.vendorID with VkPhysicalDeviceProperties props). Though, the devices are actually different from each other, the VkPhysicalDevice* values are: 0x555555c3ab80 and 0x555555c3abb0. Since these pointers are from my own temporary Vulkan instance for listing available GPUs, I cannot reuse them in the bgfx::init() function directly. The canRender value is from: const auto supportsRendering = vkGetPhysicalDeviceXlibPresentationSupportKHR( physicalDevice, qfIdx, display, visualID); The output from bgfx reflects the issue from above: ../../../src/renderer_vk.cpp (1501): BGFX Physical device 0: ../../../src/renderer_vk.cpp (1502): BGFX Name: NVIDIA GeForce RTX 2080 ../../../src/renderer_vk.cpp (1503): BGFX API version: 1.4.325 ../../../src/renderer_vk.cpp (1508): BGFX API variant: 0 ../../../src/renderer_vk.cpp (1509): BGFX Driver version: 938c0040 ../../../src/renderer_vk.cpp (1510): BGFX VendorId: 10de ../../../src/renderer_vk.cpp (1511): BGFX DeviceId: 1e82 ../../../src/renderer_vk.cpp (1512): BGFX Type: 2 … ../../../src/renderer_vk.cpp (1501): BGFX Physical device 1: ../../../src/renderer_vk.cpp (1502): BGFX Name: NVIDIA GeForce RTX 2080 ../../../src/renderer_vk.cpp (1503): BGFX API version: 1.4.325 ../../../src/renderer_vk.cpp (1508): BGFX API variant: 0 ../../../src/renderer_vk.cpp (1509): BGFX Driver version: 938c0040 ../../../src/renderer_vk.cpp (1510): BGFX VendorId: 10de ../../../src/renderer_vk.cpp (1511): BGFX DeviceId: 1e82 ../../../src/renderer_vk.cpp (1512): BGFX Type: 2 … ../../../src/renderer_vk.cpp (1606): BGFX Using physical device 1: NVIDIA GeForce RTX 2080 The chosen GPU then fails the can present test here: …