hal/metal: bump the maximum command buffer count

This commit is contained in:
Dzmitry Malyshau committed 2021-09-14 10:58:10 -04:00
1 parent 989670257a
commit d35997acd4
1 file changed
+7 -1
+7 -1
View File
@@ -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<super::Api> for super::Adapter {
&self,
features: wgt::Features,
) -> Result<crate::OpenDevice<super::Api>, 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),