mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Merge #1177
1177: Update gfx with the new iterator API r=kvark a=kvark **Connections** Gets https://github.com/gfx-rs/gfx/pull/3615 and https://github.com/gfx-rs/gfx/pull/3619 **Description** Avoids a few `collect()` calls when talking to gfx. **Testing** just local playtests Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
24
Cargo.lock
generated
24
Cargo.lock
generated
@@ -476,7 +476,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gfx-auxil"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=00285817af676e091ac886b927e9e5e292f22a03#00285817af676e091ac886b927e9e5e292f22a03"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8#2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8"
|
||||
dependencies = [
|
||||
"fxhash",
|
||||
"gfx-hal",
|
||||
@@ -486,7 +486,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gfx-backend-dx11"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=00285817af676e091ac886b927e9e5e292f22a03#00285817af676e091ac886b927e9e5e292f22a03"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8#2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
@@ -507,7 +507,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gfx-backend-dx12"
|
||||
version = "0.6.2"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=00285817af676e091ac886b927e9e5e292f22a03#00285817af676e091ac886b927e9e5e292f22a03"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8#2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-set",
|
||||
@@ -527,7 +527,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gfx-backend-empty"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=00285817af676e091ac886b927e9e5e292f22a03#00285817af676e091ac886b927e9e5e292f22a03"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8#2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8"
|
||||
dependencies = [
|
||||
"gfx-hal",
|
||||
"log",
|
||||
@@ -537,7 +537,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gfx-backend-gl"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=00285817af676e091ac886b927e9e5e292f22a03#00285817af676e091ac886b927e9e5e292f22a03"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8#2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
@@ -559,7 +559,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gfx-backend-metal"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=00285817af676e091ac886b927e9e5e292f22a03#00285817af676e091ac886b927e9e5e292f22a03"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8#2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
@@ -583,7 +583,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gfx-backend-vulkan"
|
||||
version = "0.6.5"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=00285817af676e091ac886b927e9e5e292f22a03#00285817af676e091ac886b927e9e5e292f22a03"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8#2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"ash",
|
||||
@@ -603,7 +603,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gfx-hal"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=00285817af676e091ac886b927e9e5e292f22a03#00285817af676e091ac886b927e9e5e292f22a03"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8#2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"naga",
|
||||
@@ -706,9 +706,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "inplace_it"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd01a2a73f2f399df96b22dc88ea687ef4d76226284e7531ae3c7ee1dc5cb534"
|
||||
checksum = "90953f308a79fe6d62a4643e51f848fbfddcd05975a38e69fdf4ab86a7baf7ca"
|
||||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
@@ -935,7 +935,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "naga"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/gfx-rs/naga?tag=gfx-7#0ea8a0a3c2ce1211511d763915fcc511408240c0"
|
||||
source = "git+https://github.com/gfx-rs/naga?tag=gfx-8#4a13ce022b666a4896ba1dbcbd82121e8b06ad3e"
|
||||
dependencies = [
|
||||
"bit-set",
|
||||
"bitflags",
|
||||
@@ -1201,7 +1201,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "range-alloc"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=00285817af676e091ac886b927e9e5e292f22a03#00285817af676e091ac886b927e9e5e292f22a03"
|
||||
source = "git+https://github.com/gfx-rs/gfx?rev=2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8#2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8"
|
||||
|
||||
[[package]]
|
||||
name = "raw-window-handle"
|
||||
|
||||
@@ -36,28 +36,28 @@ thiserror = "1"
|
||||
gpu-alloc = { version = "0.3", features = ["tracing"] }
|
||||
gpu-descriptor = { version = "0.1", features = ["tracing"] }
|
||||
|
||||
hal = { package = "gfx-hal", git = "https://github.com/gfx-rs/gfx", rev = "00285817af676e091ac886b927e9e5e292f22a03" }
|
||||
gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "00285817af676e091ac886b927e9e5e292f22a03" }
|
||||
hal = { package = "gfx-hal", git = "https://github.com/gfx-rs/gfx", rev = "2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8" }
|
||||
gfx-backend-empty = { git = "https://github.com/gfx-rs/gfx", rev = "2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8" }
|
||||
|
||||
[target.'cfg(all(not(target_arch = "wasm32"), all(unix, not(target_os = "ios"), not(target_os = "macos"))))'.dependencies]
|
||||
gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "00285817af676e091ac886b927e9e5e292f22a03", features = ["naga"] }
|
||||
gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "00285817af676e091ac886b927e9e5e292f22a03", features = ["naga"] }
|
||||
gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8", features = ["naga"] }
|
||||
gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8", features = ["naga"] }
|
||||
|
||||
[target.'cfg(all(not(target_arch = "wasm32"), any(target_os = "ios", target_os = "macos")))'.dependencies]
|
||||
gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", rev = "00285817af676e091ac886b927e9e5e292f22a03", features = ["naga"] }
|
||||
gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "00285817af676e091ac886b927e9e5e292f22a03", optional = true }
|
||||
gfx-backend-metal = { git = "https://github.com/gfx-rs/gfx", rev = "2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8", features = ["naga"] }
|
||||
gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8", optional = true }
|
||||
|
||||
[target.'cfg(all(not(target_arch = "wasm32"), windows))'.dependencies]
|
||||
gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", rev = "00285817af676e091ac886b927e9e5e292f22a03" }
|
||||
gfx-backend-dx11 = { git = "https://github.com/gfx-rs/gfx", rev = "00285817af676e091ac886b927e9e5e292f22a03" }
|
||||
gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "00285817af676e091ac886b927e9e5e292f22a03", features = ["naga"] }
|
||||
gfx-backend-dx12 = { git = "https://github.com/gfx-rs/gfx", rev = "2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8" }
|
||||
gfx-backend-dx11 = { git = "https://github.com/gfx-rs/gfx", rev = "2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8" }
|
||||
gfx-backend-vulkan = { git = "https://github.com/gfx-rs/gfx", rev = "2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8", features = ["naga"] }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "00285817af676e091ac886b927e9e5e292f22a03", features = ["naga"] }
|
||||
gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", rev = "2fd74dbe1562a3eef05b11dcd300c1c9c9bc12a8", features = ["naga"] }
|
||||
|
||||
[dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
tag = "gfx-7"
|
||||
tag = "gfx-8"
|
||||
features = ["spv-in", "spv-out", "wgsl-in"]
|
||||
|
||||
[dependencies.wgt]
|
||||
|
||||
@@ -62,6 +62,13 @@ impl<B: hal::Backend> CommandPool<B> {
|
||||
}
|
||||
self.available.pop().unwrap()
|
||||
}
|
||||
|
||||
fn destroy(mut self, device: &B::Device) {
|
||||
unsafe {
|
||||
self.raw.free(self.available.into_iter());
|
||||
device.destroy_command_pool(self.raw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -237,11 +244,8 @@ impl<B: hal::Backend> CommandAllocator<B> {
|
||||
}
|
||||
for thread_id in remove_threads {
|
||||
tracing::info!("Removing from thread {:?}", thread_id);
|
||||
let mut pool = inner.pools.remove(&thread_id).unwrap();
|
||||
unsafe {
|
||||
pool.raw.free(pool.available);
|
||||
device.destroy_command_pool(pool.raw);
|
||||
}
|
||||
let pool = inner.pools.remove(&thread_id).unwrap();
|
||||
pool.destroy(device);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,10 +262,7 @@ impl<B: hal::Backend> CommandAllocator<B> {
|
||||
pool.total
|
||||
);
|
||||
}
|
||||
unsafe {
|
||||
pool.raw.free(pool.available);
|
||||
device.destroy_command_pool(pool.raw);
|
||||
}
|
||||
pool.destroy(device);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,10 +15,9 @@ use crate::{
|
||||
span,
|
||||
track::{TrackerSet, UsageConflict},
|
||||
validation::{check_buffer_usage, MissingBufferUsageError},
|
||||
Label, MAX_BIND_GROUPS,
|
||||
Label,
|
||||
};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use hal::command::CommandBuffer as _;
|
||||
use thiserror::Error;
|
||||
use wgt::{BufferAddress, BufferUsage, ShaderStage};
|
||||
@@ -330,13 +329,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
bind_group,
|
||||
&temp_offsets,
|
||||
) {
|
||||
let bind_groups = iter::once(bind_group.raw.raw())
|
||||
.chain(
|
||||
follow_ups
|
||||
.clone()
|
||||
.map(|(bg_id, _)| bind_group_guard[bg_id].raw.raw()),
|
||||
)
|
||||
.collect::<ArrayVec<[_; MAX_BIND_GROUPS]>>();
|
||||
let bind_groups = iter::once(bind_group.raw.raw()).chain(
|
||||
follow_ups
|
||||
.clone()
|
||||
.map(|(bg_id, _)| bind_group_guard[bg_id].raw.raw()),
|
||||
);
|
||||
temp_offsets.extend(follow_ups.flat_map(|(_, offsets)| offsets));
|
||||
unsafe {
|
||||
raw.bind_compute_descriptor_sets(
|
||||
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
validation::{
|
||||
check_buffer_usage, check_texture_usage, MissingBufferUsageError, MissingTextureUsageError,
|
||||
},
|
||||
Label, Stored, MAX_BIND_GROUPS,
|
||||
Label, Stored,
|
||||
};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
@@ -802,11 +802,7 @@ impl<'a, B: GfxBackend> RenderPassInfo<'a, B> {
|
||||
inputs: &[],
|
||||
preserves: &[],
|
||||
};
|
||||
let all = entry
|
||||
.key()
|
||||
.all()
|
||||
.map(|(at, _)| at.clone())
|
||||
.collect::<AttachmentDataVec<_>>();
|
||||
let all = entry.key().all().map(|(at, _)| at.clone());
|
||||
|
||||
let pass = unsafe {
|
||||
device
|
||||
@@ -1127,13 +1123,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
bind_group,
|
||||
&temp_offsets,
|
||||
) {
|
||||
let bind_groups = iter::once(bind_group.raw.raw())
|
||||
.chain(
|
||||
follow_ups
|
||||
.clone()
|
||||
.map(|(bg_id, _)| bind_group_guard[bg_id].raw.raw()),
|
||||
)
|
||||
.collect::<ArrayVec<[_; MAX_BIND_GROUPS]>>();
|
||||
let bind_groups = iter::once(bind_group.raw.raw()).chain(
|
||||
follow_ups
|
||||
.clone()
|
||||
.map(|(bg_id, _)| bind_group_guard[bg_id].raw.raw()),
|
||||
);
|
||||
temp_offsets.extend(follow_ups.flat_map(|(_, offsets)| offsets));
|
||||
unsafe {
|
||||
raw.bind_graphics_descriptor_sets(
|
||||
|
||||
@@ -319,9 +319,6 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
let (mut cmd_buf_guard, mut token) = hub.command_buffers.write(&mut token);
|
||||
let cmd_buf = CommandBuffer::get_encoder_mut(&mut *cmd_buf_guard, command_encoder_id)?;
|
||||
let (buffer_guard, _) = hub.buffers.read(&mut token);
|
||||
// we can't hold both src_pending and dst_pending in scope because they
|
||||
// borrow the buffer tracker mutably...
|
||||
let mut barriers = Vec::new();
|
||||
|
||||
#[cfg(feature = "trace")]
|
||||
if let Some(ref mut list) = cmd_buf.commands {
|
||||
@@ -346,7 +343,10 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
if !src_buffer.usage.contains(BufferUsage::COPY_SRC) {
|
||||
Err(TransferError::MissingCopySrcUsageFlag)?
|
||||
}
|
||||
barriers.extend(src_pending.map(|pending| pending.into_hal(src_buffer)));
|
||||
// expecting only a single barrier
|
||||
let src_barrier = src_pending
|
||||
.map(|pending| pending.into_hal(src_buffer))
|
||||
.next();
|
||||
|
||||
let (dst_buffer, dst_pending) = cmd_buf
|
||||
.trackers
|
||||
@@ -363,7 +363,9 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
None,
|
||||
))?
|
||||
}
|
||||
barriers.extend(dst_pending.map(|pending| pending.into_hal(dst_buffer)));
|
||||
let dst_barrier = dst_pending
|
||||
.map(|pending| pending.into_hal(dst_buffer))
|
||||
.next();
|
||||
|
||||
if size % wgt::COPY_BUFFER_ALIGNMENT != 0 {
|
||||
Err(TransferError::UnalignedCopySize(size))?
|
||||
@@ -409,7 +411,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
cmd_buf_raw.pipeline_barrier(
|
||||
all_buffer_stages()..hal::pso::PipelineStage::TRANSFER,
|
||||
hal::memory::Dependencies::empty(),
|
||||
barriers,
|
||||
src_barrier.into_iter().chain(dst_barrier),
|
||||
);
|
||||
cmd_buf_raw.copy_buffer(src_raw, dst_raw, iter::once(region));
|
||||
}
|
||||
@@ -713,9 +715,6 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
let cmd_buf = CommandBuffer::get_encoder_mut(&mut *cmd_buf_guard, command_encoder_id)?;
|
||||
let (_, mut token) = hub.buffers.read(&mut token); // skip token
|
||||
let (texture_guard, _) = hub.textures.read(&mut token);
|
||||
// we can't hold both src_pending and dst_pending in scope because they
|
||||
// borrow the buffer tracker mutably...
|
||||
let mut barriers = Vec::new();
|
||||
let (src_layers, src_selector, src_offset) =
|
||||
texture_copy_view_to_hal(source, copy_size, &*texture_guard)?;
|
||||
let (dst_layers, dst_selector, dst_offset) =
|
||||
@@ -755,7 +754,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
if !src_texture.usage.contains(TextureUsage::COPY_SRC) {
|
||||
Err(TransferError::MissingCopySrcUsageFlag)?
|
||||
}
|
||||
barriers.extend(src_pending.map(|pending| pending.into_hal(src_texture)));
|
||||
//TODO: try to avoid this the collection. It's needed because both
|
||||
// `src_pending` and `dst_pending` try to hold `trackers.textures` mutably.
|
||||
let mut barriers = src_pending
|
||||
.map(|pending| pending.into_hal(src_texture))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let (dst_texture, dst_pending) = cmd_buf
|
||||
.trackers
|
||||
@@ -822,7 +825,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
cmd_buf_raw.pipeline_barrier(
|
||||
all_image_stages()..hal::pso::PipelineStage::TRANSFER,
|
||||
hal::memory::Dependencies::empty(),
|
||||
barriers,
|
||||
barriers.into_iter(),
|
||||
);
|
||||
cmd_buf_raw.copy_image(
|
||||
src_raw,
|
||||
|
||||
@@ -121,7 +121,7 @@ impl<B: hal::Backend>
|
||||
match hal::device::Device::create_descriptor_pool(
|
||||
self.0,
|
||||
max_sets as usize,
|
||||
ranges,
|
||||
ranges.into_iter(),
|
||||
hal::pso::DescriptorPoolCreateFlags::from_bits_truncate(flags.bits()),
|
||||
) {
|
||||
Ok(pool) => Ok(pool),
|
||||
|
||||
@@ -1066,10 +1066,7 @@ impl<B: GfxBackend> Device<B> {
|
||||
resolves: &[],
|
||||
preserves: &[],
|
||||
};
|
||||
let all = key
|
||||
.all()
|
||||
.map(|(at, _)| at.clone())
|
||||
.collect::<AttachmentDataVec<_>>();
|
||||
let all = key.all().map(|(at, _)| at.clone());
|
||||
|
||||
unsafe {
|
||||
self.raw
|
||||
@@ -1169,7 +1166,7 @@ impl<B: GfxBackend> Device<B> {
|
||||
let raw = unsafe {
|
||||
let mut raw_layout = self
|
||||
.raw
|
||||
.create_descriptor_set_layout(raw_bindings, &[])
|
||||
.create_descriptor_set_layout(raw_bindings, iter::empty())
|
||||
.or(Err(DeviceError::OutOfMemory))?;
|
||||
if let Some(label) = label {
|
||||
self.raw
|
||||
@@ -1526,10 +1523,7 @@ impl<B: GfxBackend> Device<B> {
|
||||
}
|
||||
|
||||
if let Some(start_binding) = write_map.keys().next().cloned() {
|
||||
let descriptors = write_map
|
||||
.into_iter()
|
||||
.flat_map(|(_, list)| list)
|
||||
.collect::<Vec<_>>();
|
||||
let descriptors = write_map.into_iter().flat_map(|(_, list)| list);
|
||||
unsafe {
|
||||
let write = hal::pso::DescriptorSetWrite {
|
||||
set: desc_set.raw_mut(),
|
||||
|
||||
@@ -619,14 +619,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
.raw
|
||||
.create_fence(false)
|
||||
.or(Err(DeviceError::OutOfMemory))?;
|
||||
let mut command_buffers = pending_write_command_buffer
|
||||
.as_ref()
|
||||
.into_iter()
|
||||
.collect::<Vec<_>>();
|
||||
for &cmd_buf_id in command_buffer_ids {
|
||||
let cmd_buf = command_buffer_guard.get(cmd_buf_id).unwrap();
|
||||
command_buffers.extend(cmd_buf.raw.iter());
|
||||
}
|
||||
let command_buffers = pending_write_command_buffer.as_ref().into_iter().chain(
|
||||
command_buffer_ids.iter().flat_map(|&cmd_buf_id| {
|
||||
command_buffer_guard.get(cmd_buf_id).unwrap().raw.iter()
|
||||
}),
|
||||
);
|
||||
let signal_semaphores = signal_swapchain_semaphores
|
||||
.into_iter()
|
||||
.map(|sc_id| &swap_chain_guard[sc_id].semaphore);
|
||||
|
||||
Reference in New Issue
Block a user