Skip to content

Restructure Device and Queue creation.#987

Open
manon-traverse wants to merge 8 commits intollvm:mainfrom
Traverse-Research:render-backend-api-device-and-queue-init
Open

Restructure Device and Queue creation.#987
manon-traverse wants to merge 8 commits intollvm:mainfrom
Traverse-Research:render-backend-api-device-and-queue-init

Conversation

@manon-traverse
Copy link
Contributor

@manon-traverse manon-traverse commented Mar 17, 2026

Adding generic buffer creation ran into the issue that queues and devices were initialized differently across implementations. This change creates a device and a queue on device creation and keeps it alive as long as the device is alive.

Additionally, the queue is now also an abstract type of which an instance can be retrieved using the getGraphicsQueue method on the Device type. In the future, we can initialize and expose more queues like an async compute and DMA queue. The Queue type will in a follow-up PR also be used to create and submit command buffers.

Drive by fixes:

Vulkan instance and device creation had a number of issues. First, the creation flow of creating an instance, destroying it, and creating a new one with a different API version is completely unnecessary. This has been replaced by just querying for the highest available version. If there are devices that do not support the higher API version, it will automatically fall back to the highest API version supported by that device.

Secondly, instance and device extensions were being mixed up. This list of device extensions that was passed to the instance extensions parameter has been replaced with instance extensions. The printExtra function still outputs the device extensions.

@manon-traverse manon-traverse force-pushed the render-backend-api-device-and-queue-init branch from acd5ed2 to fd96af1 Compare March 20, 2026 17:16
@manon-traverse manon-traverse marked this pull request as ready for review March 23, 2026 10:33
Copy link
Contributor

@bogner bogner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty good. Mostly LLVM style stuff and a question about shared pointers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants