在 Vulkan Qt 中获取队列系列
Get Queue Families in Vulkan Qt
我正在使用QVulkanWindow示例,尝试加载图像并将其显示在Qt窗口中。
这将设置 Vulkan 实例:
if (!inst.create())
qFatal("Failed to create Vulkan instance: %d", inst.errorCode());
VulkanWindow w;
w.setVulkanInstance(&inst);
现在,在 VulkanRenderer 类initResources()
,我想从设备获取 GraphicsQueue:
m_devFuncs->vkGetDeviceQueue(device, VK_QUEUE_GRAPHICS_BIT, 0, &graphicsQueue);
我得到的错误是:
vkDebug: Validation: 0: [ VUID-vkGetDeviceQueue-queueFamilyIndex-00384 ] Object: 0x564e779a5f90 (Type = 3) |
vkGetDeviceQueue: queueFamilyIndex (= 1) is not one of the queue families given via VkDeviceQueueCreateInfo structures when the device was created.
The Vulkan spec states: queueFamilyIndex must be one of the queue family indices specified when device was created, via the VkDeviceQueueCreateInfo structure
Qt没有设置图形队列吗?还是我做错了?还是应该创建自己的VkInstance并将其传递给Qt?
VK_QUEUE_GRAPHICS_BIT
是一个枚举,而不是队列系列索引。所以代码从根本上是不正确的。
QVulkanWindow
的graphicsQueue()
方法返回可以使用的VkQueue
。
相关文章:
- boost::进程间消息队列引发错误
- 如果我只是不访问queue_front节点的子节点,而是将它们推到队列中呢?还是BFS吗
- Android NDK传感器向事件队列报告奇怪的间隔
- C++优先级队列,按对象的唯一指针的特定方法升序排列
- 按对象的特定方法按升序排列的C++优先级队列
- 使用2个键的cpp-stl::优先级队列排序不正确
- 我是否需要在下一次转移时将所有权*转移回转移队列
- 在一个读写器队列中,我可以用volatile替换原子吗
- 为什么我的多线程作业队列崩溃
- 尝试将lambda函数放在队列中时出现一般分配器错误(可能是与unique_ptr有关的错误)
- 使用"Task"函数指针队列定义作业管理器
- 在c++队列中使用pop和visit实现线程安全
- 为什么我需要C++中不同的排序格式来对这个USACO代码上的数组和优先级队列进行排序
- 从 c 或 cpp 系列子函数返回到主函数
- 打印优先级队列
- 共享队列的线程安全
- 在 Vulkan Qt 中获取队列系列
- Vulkan 的传输队列系列功能和显卡支持:条件检查是否准确?
- 有关如何处理 vulkan 队列系列的问题
- Vulkan --- vkAcquireNextImageKHR 在使用某些队列系列时抛出 std::out_of_ra