From 4f068467c4954fb79e6ce297ae1ac0fdd2bdf16a Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:24 +0100 Subject: WIP refactor(skeleton): type state for context also some api improvements closes #2 related: #7 --- stockton-skeleton/src/buffers/staging.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stockton-skeleton/src/buffers/staging.rs') diff --git a/stockton-skeleton/src/buffers/staging.rs b/stockton-skeleton/src/buffers/staging.rs index 44d0c2d..35cac00 100644 --- a/stockton-skeleton/src/buffers/staging.rs +++ b/stockton-skeleton/src/buffers/staging.rs @@ -27,7 +27,7 @@ where pub fn from_context(context: &mut RenderingContext, size: u64) -> Result { context.ensure_memory_pool::

()?; - let mut device = context.device().write().map_err(|_| LockPoisoned::Device)?; + let mut device = context.lock_device()?; let mut mempool = context .existing_memory_pool() .unwrap() @@ -70,7 +70,7 @@ where } pub fn deactivate_context(self, context: &mut RenderingContext) { - let mut device = context.device().write().unwrap(); + let mut device = context.lock_device().unwrap(); let mut mempool = context.existing_memory_pool().unwrap().write().unwrap(); self.deactivate_device_pool(&mut device, &mut mempool) -- cgit v1.2.3