diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:24 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:24 +0100 |
commit | 5e6396ed225be9a9991705de10174b3cf085f8f0 (patch) | |
tree | 90486e8fa38013a682cde84b3b1cb74fe097d704 /stockton-render/src | |
parent | 59b5e4463d6eec0de27d6da6c85f8c719674e966 (diff) |
refactor(skeleton): type phases of queue negotiation
Diffstat (limited to 'stockton-render/src')
-rw-r--r-- | stockton-render/src/level.rs | 12 | ||||
-rw-r--r-- | stockton-render/src/ui.rs | 12 |
2 files changed, 10 insertions, 14 deletions
diff --git a/stockton-render/src/level.rs b/stockton-render/src/level.rs index e288617..3851cee 100644 --- a/stockton-render/src/level.rs +++ b/stockton-render/src/level.rs @@ -17,7 +17,7 @@ use stockton_skeleton::{ draw_passes::{util::TargetSpecificResources, DrawPass, IntoDrawPass, PassPosition}, error::LockPoisoned, mem::{DataPool, DepthBufferPool, StagingPool, TexturesPool}, - queue_negotiator::QueueNegotiator, + queue_negotiator::QueueFamilyNegotiator, texture::{resolver::TextureResolver, TexLoadQueue, TextureLoadConfig, TextureRepo}, types::*, }; @@ -459,13 +459,11 @@ where fn find_aux_queues<'c>( adapter: &'c Adapter, - queue_negotiator: &mut QueueNegotiator, - ) -> Result<Vec<(&'c QueueFamilyT, Vec<f32>)>> { - queue_negotiator.find(adapter, &TexLoadQueue)?; + queue_negotiator: &mut QueueFamilyNegotiator, + ) -> Result<()> { + queue_negotiator.find(adapter, &TexLoadQueue, 1)?; - Ok(vec![ - queue_negotiator.family_spec::<TexLoadQueue>(&adapter.queue_families, 1)? - ]) + Ok(()) } } diff --git a/stockton-render/src/ui.rs b/stockton-render/src/ui.rs index 89afe18..f688f42 100644 --- a/stockton-render/src/ui.rs +++ b/stockton-render/src/ui.rs @@ -11,7 +11,7 @@ use stockton_skeleton::{ draw_passes::{util::TargetSpecificResources, DrawPass, IntoDrawPass, PassPosition}, error::LockPoisoned, mem::{DataPool, StagingPool, TexturesPool}, - queue_negotiator::QueueNegotiator, + queue_negotiator::QueueFamilyNegotiator, texture::{ resolver::TextureResolver, LoadableImage, TexLoadQueue, TextureLoadConfig, TextureRepo, }, @@ -341,13 +341,11 @@ impl<'a, P: PassPosition> IntoDrawPass<UiDrawPass<'a>, P> for () { fn find_aux_queues<'c>( adapter: &'c Adapter, - queue_negotiator: &mut QueueNegotiator, - ) -> Result<Vec<(&'c QueueFamilyT, Vec<f32>)>> { - queue_negotiator.find(adapter, &TexLoadQueue)?; + queue_negotiator: &mut QueueFamilyNegotiator, + ) -> Result<()> { + queue_negotiator.find(adapter, &TexLoadQueue, 1)?; - Ok(vec![ - queue_negotiator.family_spec::<TexLoadQueue>(&adapter.queue_families, 1)? - ]) + Ok(()) } } |