From d35997acd4804e650f044fd93270d85fe572807f Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 14 Sep 2021 08:52:05 -0400 Subject: [PATCH] hal/metal: bump the maximum command buffer count --- wgpu-hal/src/metal/adapter.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wgpu-hal/src/metal/adapter.rs b/wgpu-hal/src/metal/adapter.rs index 3e084b899..c3ea098b2 100644 --- a/wgpu-hal/src/metal/adapter.rs +++ b/wgpu-hal/src/metal/adapter.rs @@ -4,6 +4,8 @@ use parking_lot::Mutex; use std::{sync::Arc, thread}; +const MAX_COMMAND_BUFFERS: u64 = 2048; + unsafe impl Send for super::Adapter {} unsafe impl Sync for super::Adapter {} @@ -18,7 +20,11 @@ impl crate::Adapter for super::Adapter { &self, features: wgt::Features, ) -> Result, crate::DeviceError> { - let queue = self.shared.device.lock().new_command_queue(); + let queue = self + .shared + .device + .lock() + .new_command_queue_with_max_command_buffer_count(MAX_COMMAND_BUFFERS); Ok(crate::OpenDevice { device: super::Device { shared: Arc::clone(&self.shared),