Restructure Device and Queue creation.#987
Open
manon-traverse wants to merge 8 commits intollvm:mainfrom
Open
Conversation
bd7df2d to
acd5ed2
Compare
acd5ed2 to
fd96af1
Compare
damyanp
reviewed
Mar 24, 2026
bogner
reviewed
Mar 25, 2026
Contributor
bogner
left a comment
There was a problem hiding this comment.
Looking pretty good. Mostly LLVM style stuff and a question about shared pointers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
getGraphicsQueuemethod on theDevicetype. In the future, we can initialize and expose more queues like an async compute and DMA queue. TheQueuetype 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
printExtrafunction still outputs the device extensions.