Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为 Vulkan API 编写 C++ 包装器,因此我想确保我的文档不会与实际 API 所说的相矛盾。
Device device1 = physical_device.Connect(device_settings); Device device2 = physical_device.Connect(device_settings);
即使在启用 LunarG 标准验证层的情况下运行,此方案也有效。但是目前有很多东西通过了验证层,尽管是不正确的。所以我的问题是,这样做是否有效?
根据以下规范vkCreateDevice:
vkCreateDevice
可以从同一个物理设备创建多个逻辑设备。
不需要这么说,因为文档的“有效用法”部分没有明确禁止它。诚然,下一句是:
由于缺少特定于设备的资源(除了其他错误),逻辑设备创建可能会失败。
所以你不能VkDevice从同一个VkPhysicalDevice. 如果实现不想支持多个,则不必。
VkDevice
VkPhysicalDevice