-
Notifications
You must be signed in to change notification settings - Fork 75
Multi-Queue Support #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Multi-Queue Support #339
Changes from all commits
0822186
ecbfe3a
2967b65
a24f3b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,6 +162,10 @@ pub struct ContextDesc { | |
| pub overlay: bool, | ||
| /// Force selection of a specific Device ID. | ||
| pub device_id: Option<u32>, | ||
| /// Enable multi-queue support (async compute and transfer). | ||
| /// When enabled, every `submit` call must provide explicit | ||
| /// synchronization via a non-empty list of sync points. | ||
| pub multi_queue: bool, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now we can request In the Game, if we have true async compute we will want to do our resource "Ping-Ponging", but if we don't it would be nice to only allocate one set of probe data resources and render and sample the same all the time. So, maybe it would be nice to be able to query somehow if they are all the same queues really under the hood after Context creation, maybe Or, But maybe I am worrying about something that isn't really an issue and this is too nieche to expose.. Its not the end of the world if we have unnecessary probe datum
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to add this to |
||
| } | ||
|
|
||
| #[derive(Debug)] | ||
|
|
@@ -253,6 +257,8 @@ pub struct Capabilities { | |
| pub shader_float16: bool, | ||
| /// Cooperative matrix support. | ||
| pub cooperative_matrix: CooperativeMatrix, | ||
| /// Available GPU queues. Always contains [`QueueType::Main`]. | ||
| pub queues: Vec<QueueType>, | ||
| } | ||
|
|
||
| #[derive(Clone, Debug)] | ||
|
|
@@ -870,12 +876,16 @@ pub struct ShaderDesc<'a> { | |
| pub naga_module: Option<naga::Module>, | ||
| } | ||
|
|
||
| #[derive(Clone, Debug, Default, PartialEq)] | ||
| pub enum CommandType { | ||
| Transfer, | ||
| Compute, | ||
| /// Type of GPU queue to submit work to. | ||
| #[derive(Clone, Copy, Debug, Default, PartialEq)] | ||
| pub enum QueueType { | ||
| /// Main graphics+compute+transfer queue. | ||
| #[default] | ||
| General, | ||
| Main, | ||
| /// Dedicated async compute queue. | ||
| AsyncCompute, | ||
| /// Dedicated async transfer queue. | ||
| AsyncTransfer, | ||
| } | ||
|
|
||
| pub struct CommandEncoderDesc<'a> { | ||
|
|
@@ -884,6 +894,8 @@ pub struct CommandEncoderDesc<'a> { | |
| /// For example, one buffer is being run on GPU while the | ||
| /// other is being actively encoded, which makes 2. | ||
| pub buffer_count: u32, | ||
| /// Queue to submit commands to. | ||
| pub queue: QueueType, | ||
| } | ||
|
|
||
| pub struct ComputePipelineDesc<'a> { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SyncPoint being default helps a lot with the ergonomics, nice!