From c92ddd37d04ebc7fb5582edd399f607c542e5501 Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:23 +0100 Subject: fix(draw): better queue negotiator --- stockton-render/src/draw/texture/repo.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'stockton-render/src/draw/texture/repo.rs') diff --git a/stockton-render/src/draw/texture/repo.rs b/stockton-render/src/draw/texture/repo.rs index ef35610..d2aa9f2 100644 --- a/stockton-render/src/draw/texture/repo.rs +++ b/stockton-render/src/draw/texture/repo.rs @@ -4,6 +4,7 @@ use super::{ loader::{BlockRef, LoaderRequest, TextureLoader, TextureLoaderRemains, NUM_SIMULTANEOUS_CMDS}, resolver::TextureResolver, }; +use crate::draw::queue_negotiator::QueueFamilySelector; use crate::error::LockPoisoned; use crate::types::*; @@ -43,10 +44,6 @@ pub struct TextureRepo<'a> { } impl<'a> TextureRepo<'a> { - pub fn queue_family_filter(family: &&QueueFamilyT) -> bool { - family.queue_type().supports_transfer() && family.max_queues() >= NUM_SIMULTANEOUS_CMDS - } - pub fn new( device_lock: Arc>, family: QueueFamilyId, @@ -198,3 +195,11 @@ impl<'a> TextureRepo<'a> { } } } + +pub struct TexLoadQueue; + +impl QueueFamilySelector for TexLoadQueue { + fn is_suitable(&self, family: &QueueFamilyT) -> bool { + family.queue_type().supports_transfer() && family.max_queues() >= NUM_SIMULTANEOUS_CMDS + } +} \ No newline at end of file -- cgit v1.2.3