KhronosGroup / KhronosGroup/Vulkan-Docs

Separate queue creation from logical device creation

Open
#1,797 6 comments 0 reactions 1 assignee Claimed by @TomOlson View on GitHub
Feature Request
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

In some cases (e.g. when sharing a single VkDevice between multiple libraries, some of which have internal threading), it can be needlessly difficult to negotiate the creation of a single shared set of VkQueues, especially because these queues are externally synchronized.

In this use case I think it would be very useful to allow creating VkQueues *after* device creation is finished, e.g. by initializing the device with 0 queues and then using a separate dedicated function like `vkCreateQueueSet` which essentially takes the same parameters as the queue selection options in `vkCreateDevice`. That way, each library can create its own `VkQueueSet` which would functionally act like queues belonging to separate logical devices (but still constitute a single logical device, with shared state including allocated memory and GPU resources).

Right now, the only way to accomplish something like this is to create two logical devices instead - one per library - but then there's no (cross-platform) way to share memory or pass images between these devices.

Alternatively, there could be a device feature to make `VkQueue` implicitly synchronized. That would also get around this mess. I really don't understand why they're marked as externally synchronized when you only get one set per device, and most other things at the per-device level are implicitly synchronized...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.