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/staged.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stockton-skeleton/src/buffers/staged.rs') diff --git a/stockton-skeleton/src/buffers/staged.rs b/stockton-skeleton/src/buffers/staged.rs index ec42102..2ece045 100644 --- a/stockton-skeleton/src/buffers/staged.rs +++ b/stockton-skeleton/src/buffers/staged.rs @@ -56,7 +56,7 @@ where context.ensure_memory_pool::()?; // Lock the device and memory pools - let mut device = context.device().write().map_err(|_| LockPoisoned::Device)?; + let mut device = context.lock_device()?; let mut mempool = context .existing_memory_pool::

() .unwrap() @@ -111,7 +111,7 @@ where /// Destroy all Vulkan objects. Should be called before dropping. pub fn deactivate(mut self, context: &mut RenderingContext) { unsafe { - let device = &mut *context.device().write().unwrap(); + let device = &mut *context.lock_device().unwrap(); self.staged_memory.unmap(device).unwrap(); -- cgit v1.2.3