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 | 4f068467c4954fb79e6ce297ae1ac0fdd2bdf16a (patch) | |
tree | 4b3ec44d068f71ab80e8c85a6515a8862407ac56 /stockton-skeleton/src/texture/repo.rs | |
parent | 5e6396ed225be9a9991705de10174b3cf085f8f0 (diff) |
WIP refactor(skeleton): type state for context
also some api improvements
closes #2
related: #7
Diffstat (limited to 'stockton-skeleton/src/texture/repo.rs')
-rw-r--r-- | stockton-skeleton/src/texture/repo.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/stockton-skeleton/src/texture/repo.rs b/stockton-skeleton/src/texture/repo.rs index 635eebb..4591f17 100644 --- a/stockton-skeleton/src/texture/repo.rs +++ b/stockton-skeleton/src/texture/repo.rs @@ -68,11 +68,7 @@ where // Create Channels let (req_send, req_recv) = channel(); let (resp_send, resp_recv) = channel(); - let device = context - .device() - .write() - .map_err(|_| LockPoisoned::Device) - .context("Error getting device lock")?; + let device = context.lock_device()?; // Create descriptor set layout let ds_lock = Arc::new(RwLock::new( @@ -193,7 +189,7 @@ where .unwrap(); // Only now can we lock device without deadlocking - let mut device = context.device().write().unwrap(); + let mut device = context.lock_device().unwrap(); // Return all the texture memory and descriptors. for (_, v) in self.blocks.drain() { |