diff --git a/crates/metal2vulkan-runtime/README.md b/crates/metal2vulkan-runtime/README.md index ad4f4285b..cf7b7e76d 100644 --- a/crates/metal2vulkan-runtime/README.md +++ b/crates/metal2vulkan-runtime/README.md @@ -377,7 +377,8 @@ the record the pass is making. blit, which then costs time: RADV lists every import in every submission. Nothing of Metal's observes it. A no-copy buffer, heap, or buffer's or heap's rebind whose import the caller's gate refuses (`HostMemory::with_import_gate`), or whose admitted import fails, and a no-copy buffer - or heap whose pointer the device refuses with no source of dma-bufs given, is made over a copy of + or heap whose pointer the device refuses with no dma-buf of its pages serving it (no source + given, or one that failed or whose dma-bufs the device refused), is made over a copy of its bytes in memory of the device's own, announced (`copied-host-pages`, [HOWTO](../../docs/HOWTO.md#copied-host-buffers)), wherever the process maps the pages readable (a dma-buf's mapping among them); over pages not mapped readable it is refused. A diff --git a/crates/metal2vulkan-runtime/src/buffer_descriptor.rs b/crates/metal2vulkan-runtime/src/buffer_descriptor.rs index 3b3f6264e..b019e37cc 100644 --- a/crates/metal2vulkan-runtime/src/buffer_descriptor.rs +++ b/crates/metal2vulkan-runtime/src/buffer_descriptor.rs @@ -855,6 +855,9 @@ impl Device { // idle and import them again (`host_residency.rs`), as it may its own import of the // pointer where the driver's pointer imports follow their address; a heap's import // stays, as does an import of a read-only view. + // Whether the device was asked the pointer, whose refusal a failed source leaves + // standing (the window takes it, and the memory is no dma-buf-only memory). + let by_pointer = host.by_pointer; let imported = match unsafe { self.import_by_pointer(importer, pointer, length, host, class) } { @@ -875,7 +878,14 @@ impl Device { call, importer, pointer, length, window, source, class, keep, ) } - .map_err(|failed| (source_failure(failed, refusal), false)), + .map_err(|failed| { + // No dma-buf of the pages served either (the source failed, or the + // device refused its dma-bufs): the device's refusal of the pointer, + // as where no source is given. + let by_device = + by_pointer && refused(&failed) && refusal == not_importable(); + (source_failure(failed, refusal), by_device) + }), // The device's refusal of the pointer, with no source of dma-bufs of the // pages to take instead. Err(error) => { @@ -896,8 +906,9 @@ impl Device { return copied.map(|buffer| noted(kept(buffer, log, kept_runs))); } // Pages whose pointer the device refuses (RADV refuses shared memory, a - // `memfd` mapping among it), with no dma-buf source of them: a copy, - // announced, as Metal makes a no-copy buffer over any page. + // `memfd` mapping among it), with no dma-buf of them served (no source given, + // a source that failed, dma-bufs the device refused): a copy, announced, as + // Metal makes a no-copy buffer over any page. Err((_, true)) if copyable => { let why = CopiedFor::DeviceRefused; // SAFETY: the caller's contract. @@ -1791,8 +1802,9 @@ impl Device { } CopiedBecause::DeviceRefused => { "the device refused their pointer's import (VK_EXT_external_memory_host), as \ - RADV refuses shared memory, and no source of dma-bufs of them was given \ - (HostMemory::with_dma_buf)" + RADV refuses shared memory, and no dma-buf of them served it: no source of \ + them was given (HostMemory::with_dma_buf), or it failed, or the device \ + refused its dma-bufs" } CopiedBecause::Failed => "their import failed", CopiedBecause::Moved => { @@ -2280,8 +2292,9 @@ pub(super) fn no_copy_options(options: ResourceOptions) -> (ResourceOptions, boo enum CopiedFor { /// The caller's gate refused their import (`HostMemory::with_import_gate`). Refused, - /// The device refused their pointer's import, and the caller gave no source of dma-bufs of - /// them (`HostMemory::with_dma_buf`). + /// The device refused their pointer's import, and no dma-buf of them served it: the caller + /// gave no source of them (`HostMemory::with_dma_buf`), or its source failed, or the device + /// refused its dma-bufs. DeviceRefused, /// The import the device and the gate admitted failed, with this. Failed(Error), diff --git a/crates/metal2vulkan-runtime/src/copied.rs b/crates/metal2vulkan-runtime/src/copied.rs index b6d8dafc7..b7ce2d813 100644 --- a/crates/metal2vulkan-runtime/src/copied.rs +++ b/crates/metal2vulkan-runtime/src/copied.rs @@ -1,11 +1,12 @@ //! Copied host buffers: a no-copy buffer whose import of the caller's pages the caller's gate //! refused ([`HostMemory::with_import_gate`](crate::HostMemory)), whose pointer the device refused -//! with no source of dma-bufs of the pages given (RADV refuses shared memory, a `memfd` mapping -//! among it), or whose import the gate and the device admitted and that then failed (out of memory, another Vulkan error, or the runtime's -//! refusal of pages the kernel cannot pin on a driver whose failed import of them breaks it, -//! `RuntimeDriverDefect::UnpinnablePagesBreakHostMemory`, that no dma-buf of them served), is made -//! all the same over a copy of its bytes (`Device::buffer_over_host_memory`), announced -//! (`copied-host-pages`). No import maps the pages, so they take no kernel mapping. +//! with no dma-buf of the pages serving it (no source of them given, or one that failed or whose +//! dma-bufs the device refused; RADV refuses shared memory, a `memfd` mapping among it), or whose +//! import the gate and the device admitted and that then failed (out of memory, another Vulkan +//! error, or the runtime's refusal of pages the kernel cannot pin on a driver whose failed import +//! of them breaks it, `RuntimeDriverDefect::UnpinnablePagesBreakHostMemory`, that no dma-buf of +//! them served), is made all the same over a copy of its bytes (`Device::buffer_over_host_memory`), +//! announced (`copied-host-pages`). No import maps the pages, so they take no kernel mapping. //! //! - **The copy.** A `VkBuffer` of the buffer's length in host-visible, coherent memory of the //! runtime's own ([`MemoryClass::Shared`](crate::memory::MemoryClass)), which the GPU uses; the diff --git a/crates/metal2vulkan-runtime/src/degradation.rs b/crates/metal2vulkan-runtime/src/degradation.rs index 24d98635d..dd0cdc79a 100644 --- a/crates/metal2vulkan-runtime/src/degradation.rs +++ b/crates/metal2vulkan-runtime/src/degradation.rs @@ -2047,8 +2047,9 @@ degradations! { /// caller's host pages in memory of the device's own, which no import maps (`copied.rs`; /// a heap's textures shadows of its bytes): the caller's gate /// (`HostMemory::with_import_gate`) refused the pages' import, or the device refused the - /// pointer's import and the caller gave no source of dma-bufs of the pages - /// (`HostMemory::with_dma_buf`; RADV refuses shared memory, a `memfd` mapping among it, + /// pointer's import and no dma-buf of the pages served it, the caller giving no source of + /// them (`HostMemory::with_dma_buf`) or one that failed or whose dma-bufs the device + /// refused (RADV refuses shared memory, a `memfd` mapping among it, /// `WorkCounts::copied_host_buffers_device_refused`), or the import the device /// and the gate admitted failed, of the pointer or of the caller's dma-bufs (out of /// memory, or another Vulkan error, such as a driver out of the mappings the host kernel diff --git a/crates/metal2vulkan-runtime/src/dma_buf.rs b/crates/metal2vulkan-runtime/src/dma_buf.rs index 6dd4d2498..99e6bf489 100644 --- a/crates/metal2vulkan-runtime/src/dma_buf.rs +++ b/crates/metal2vulkan-runtime/src/dma_buf.rs @@ -70,10 +70,14 @@ //! - **Rebinds** of a heap onto pages imported as dma-bufs make each such texture's image again //! over its own new pages before the rebind settles (`rebind.rs`), and are refused //! (`NotImplemented(RebindTextures)`) where one is not made. -//! - **Refused** (the pointer's refusal: `Unsupported`, `HostMemory`): a source that fails, chunks -//! the device imports as no type the buffer takes, a driver that refuses a chunk, and a sparse -//! buffer whose alignment misses the granule asked. Counted: `WorkCounts::dma_buf_imports` (each -//! chunk) and `WorkCounts::dma_buf_sparse_buffers`. +//! - **Not imported**: a source that fails, chunks the device imports as no type the buffer takes, +//! a driver that refuses a chunk, and a sparse buffer whose alignment misses the granule asked. +//! The pointer's refusal stands: a no-copy buffer or heap whose pointer the device refused is a +//! copy of the pages, as where no source is given (`copied.rs`, +//! `WorkCounts::copied_host_buffers_device_refused`); a rebind, memory imported only as dma-bufs +//! and pages whose window the device's import alignment does not cover are refused +//! (`Unsupported`, `HostMemory`). Counted: `WorkCounts::dma_buf_imports` (each chunk) and +//! `WorkCounts::dma_buf_sparse_buffers`. use super::buffer::{usage, Pages}; use super::buffer_descriptor::HostBuffer; diff --git a/crates/metal2vulkan-runtime/src/host_memory.rs b/crates/metal2vulkan-runtime/src/host_memory.rs index ddca60783..3cf0f4412 100644 --- a/crates/metal2vulkan-runtime/src/host_memory.rs +++ b/crates/metal2vulkan-runtime/src/host_memory.rs @@ -282,9 +282,12 @@ impl HostMemory { /// A texture over such pages (over the buffer, placed in the heap, or a view of one) is an /// image over a dma-buf of its own pages where the device lists /// `VK_EXT_image_drm_format_modifier` and `VK_EXT_queue_family_foreign`, else a shadow of the - /// bytes (announced `shadowed-texture`). Refused as [`HostMemory::new`]'s memory is - /// (`Unsupported`, `HostMemory`) where the device imports no chunk or the source fails; chunks - /// that break the source's contract are misuse (`Invalid`, `Problem::DmaBuf`). Measured: RADV + /// bytes (announced `shadowed-texture`). Where the device imports no chunk or the source + /// fails, the pointer's refusal stands: a no-copy buffer or heap is a copy of the pages, as + /// [`HostMemory::new`]'s memory is where the device refuses its pointer (`copied-host-pages`, + /// `WorkCounts::copied_host_buffers_device_refused`), and a rebind is refused (`Unsupported`, + /// `HostMemory`); chunks that break the source's contract are misuse (`Invalid`, + /// `Problem::DmaBuf`). Measured: RADV /// refuses the pointer of `memfd` and other shared mappings and imports `udmabuf`s of their /// pages; NVIDIA and lavapipe import the pointer and never call the source. ANV (Mesa 26.2.6 on /// i915) imports the pointer of a `memfd`'s mapping and refuses that of a dma-buf's mapping diff --git a/crates/metal2vulkan-runtime/src/host_shared_pointers.rs b/crates/metal2vulkan-runtime/src/host_shared_pointers.rs index 982925ff3..a1689646d 100644 --- a/crates/metal2vulkan-runtime/src/host_shared_pointers.rs +++ b/crates/metal2vulkan-runtime/src/host_shared_pointers.rs @@ -26,7 +26,7 @@ impl Device { /// /// Where it is false, a no-copy buffer over shared memory is imported only from the caller's /// dma-buf source ([`HostMemory::with_dma_buf`](crate::HostMemory::with_dma_buf)), and without - /// one is a copy of the pages, announced (`copied-host-pages`, + /// one that works is a copy of the pages, announced (`copied-host-pages`, /// `WorkCounts::copied_host_buffers_device_refused`). A source is what such memory needs to be /// imported, whatever its pages' protection: pages the process maps /// read-only go to the source without their pointer's import being tried (a dma-buf pins diff --git a/crates/metal2vulkan-runtime/src/tests/copied_device.rs b/crates/metal2vulkan-runtime/src/tests/copied_device.rs index 8d74faa42..d10744daa 100644 --- a/crates/metal2vulkan-runtime/src/tests/copied_device.rs +++ b/crates/metal2vulkan-runtime/src/tests/copied_device.rs @@ -182,7 +182,12 @@ impl Host { Some(gate) => memory.with_import_gate(gate), None => memory, }; - // SAFETY: as above. + self.buffer_over(device, memory) + } + + /// A no-copy buffer over its bytes, made with `memory`, which names them. + fn buffer_over(&self, device: &Device, memory: HostMemory) -> Buffer { + // SAFETY: as for `buffer`. unsafe { device.new_buffer_with_bytes_no_copy( memory, @@ -407,40 +412,75 @@ fn copied_buffer_is_made_where_the_caller_s_gate_refuses_the_import() { } /// A no-copy buffer over shared memory (a `memfd` mapped shared, as QEMU's -/// `memory-backend-memfd,share=on` guest RAM is) made with no source of dma-bufs of its pages: on a -/// device that refuses the pointer of shared memory (`Device::imports_shared_host_pointers`, RADV) -/// a copy of the pages, announced and counted as the device's refusal, with every copy's -/// coherence, where the call was refused before; elsewhere an import of the pointer. +/// `memory-backend-memfd,share=on` guest RAM is) made with no source of dma-bufs of its pages, and +/// one made with a source that fails: on a device that refuses the pointer of shared memory +/// (`Device::imports_shared_host_pointers`, RADV) each a copy of the pages, announced (once) and +/// counted as the device's refusal, with every copy's coherence, the source called once, where +/// the call was refused before; elsewhere an import of the pointer, the source never called. #[cfg(target_os = "linux")] #[test] fn copied_buffer_is_made_over_shared_memory_whose_pointer_the_device_refuses() { - let host = Host::over_shared_memory(9); + use std::sync::atomic::{AtomicUsize, Ordering}; + // Pages of their own each, so that neither buffer lies in the other's copy. + let hosts = [Host::over_shared_memory(9), Host::over_shared_memory(10)]; let Some((device, heard)) = device() else { return; }; let refuses = !device.imports_shared_host_pointers().unwrap(); - let before = device.work_counts(); - let buffer = host.buffer(&device, None); - let after = device.work_counts(); - let device_refused = - after.copied_host_buffers_device_refused - before.copied_host_buffers_device_refused; - eprintln!( - "COPIED {}: the device refuses shared memory's pointer: {refuses}; the buffer over it is \ - {:?}, {device_refused} copied for the device's refusal", - device.name(), - buffer.host_backing(), - ); - match refuses { - true => { - assert_eq!(device_refused, 1, "counted as the device's refusal"); - assert_eq!(moved(&before, &after), [0, 1, 0, 0, 0], "a copy, no import"); - assert_eq!(announced(&heard), 1, "announced"); - lies_in_a_copy(&device, &buffer, &host); - } - false => { - assert_eq!(device_refused, 0); - assert_eq!(buffer.host_backing(), Some(HostBacking::ImportedByPointer)); + let calls = Arc::new(AtomicUsize::new(0)); + for (host, failing) in hosts.iter().zip([false, true]) { + let memory = match failing { + // SAFETY: as for `Host::buffer`. + false => unsafe { HostMemory::new(host.pointer) }, + true => { + let counted = Arc::clone(&calls); + let source: crate::DmaBufSource = Arc::new(move |_| { + counted.fetch_add(1, Ordering::Relaxed); + Err(std::io::Error::other("no dma-buf")) + }); + // SAFETY: as for `Host::buffer`, and the source answers no chunk. + unsafe { HostMemory::with_dma_buf(host.pointer, source) } + } + }; + let source = match failing { + true => "a source that fails", + false => "no source", + }; + let before = device.work_counts(); + let buffer = host.buffer_over(&device, memory); + let after = device.work_counts(); + let device_refused = + after.copied_host_buffers_device_refused - before.copied_host_buffers_device_refused; + eprintln!( + "COPIED {}: the device refuses shared memory's pointer: {refuses}; the buffer over it \ + with {source} is {:?}, {device_refused} copied for the device's refusal, the source \ + called {} times", + device.name(), + buffer.host_backing(), + calls.load(Ordering::Relaxed) + ); + match refuses { + true => { + assert_eq!( + device_refused, 1, + "{source}: counted as the device's refusal" + ); + assert_eq!(moved(&before, &after), [0, 1, 0, 0, 0], "{source}: a copy"); + assert_eq!(announced(&heard), 1, "{source}: announced once"); + lies_in_a_copy(&device, &buffer, host); + assert_eq!(calls.load(Ordering::Relaxed), usize::from(failing)); + } + false => { + assert_eq!(device_refused, 0); + assert_eq!(buffer.host_backing(), Some(HostBacking::ImportedByPointer)); + assert_eq!( + calls.load(Ordering::Relaxed), + 0, + "{source}: no source called" + ); + } } + drop(buffer); } } diff --git a/crates/metal2vulkan-runtime/src/work_counts.rs b/crates/metal2vulkan-runtime/src/work_counts.rs index 51b5740a3..0bed054a3 100644 --- a/crates/metal2vulkan-runtime/src/work_counts.rs +++ b/crates/metal2vulkan-runtime/src/work_counts.rs @@ -6750,9 +6750,10 @@ pub struct WorkCounts { pub copied_host_buffers_made: u64, /// Of those, the ones made because the caller's gate refused the import. pub copied_host_buffers_refused: u64, - /// Of those, the ones made because the device refused the pointer's import and the caller - /// gave no source of dma-bufs of the pages (`HostMemory::with_dma_buf`): RADV refuses shared - /// memory, a `memfd` mapping among it (`Device::imports_shared_host_pointers`). + /// Of those, the ones made because the device refused the pointer's import and no dma-buf of + /// the pages served it: the caller gave no source of them (`HostMemory::with_dma_buf`), or + /// its source failed, or the device refused its dma-bufs. RADV refuses shared memory, a + /// `memfd` mapping among it (`Device::imports_shared_host_pointers`). pub copied_host_buffers_device_refused: u64, /// Of those, the ones made because an import the device and the gate admitted failed (out /// of memory, another Vulkan error), or because the runtime refused the pages for the driver @@ -9084,7 +9085,8 @@ impl Device { pub(crate) enum CopiedBecause { /// The caller's gate refused their import (`HostMemory::with_import_gate`). Refused, - /// The device refused their pointer's import, and no source of dma-bufs of them was given. + /// The device refused their pointer's import, and no dma-buf of them served it: no source of + /// them was given, or it failed, or the device refused its dma-bufs. DeviceRefused, /// The import the device and the gate admitted failed. Failed, diff --git a/crates/metal2vulkan-validation/src/runtime_lane/dma_buf_imports.rs b/crates/metal2vulkan-validation/src/runtime_lane/dma_buf_imports.rs index 73b6ec7b9..1499839a8 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/dma_buf_imports.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/dma_buf_imports.rs @@ -1087,15 +1087,15 @@ fn a_keep_alive_goes_after_the_imports_of_its_pages() { }); } -/// The refusals: memfd memory with no source is no refusal, made on every device: where the -/// device refuses its pointer (RADV) a copy of its pages (`copied.rs`), counted as the device's -/// refusal (`WorkCounts::copied_host_buffers_device_refused`), else an import of the pointer. A -/// source that fails keeps the device's refusal, called once; chunks that do not cover the pages, -/// and a chunk whose descriptor is no dma-buf (the memfd itself), are the caller's misuse -/// (`Invalid`, `DmaBuf`), their descriptors closed. No dma-buf import is counted for any of them. -/// Where the device imports the pointer, each is made and no source is called. +/// Without a working source: memfd memory with no source, and with a source that fails, is no +/// refusal, made on every device: where the device refuses its pointer (RADV) a copy of its pages +/// (`copied.rs`), counted as the device's refusal (`WorkCounts::copied_host_buffers_device_refused`), +/// the failing source called once, else an import of the pointer, no source called. Chunks that +/// do not cover the pages, and a chunk whose descriptor is no dma-buf (the memfd itself), are the +/// caller's misuse (`Invalid`, `DmaBuf`), their descriptors closed. No dma-buf import is counted +/// for any of them. Where the device imports the pointer, each is made and no source is called. #[test] -fn shared_memory_is_refused_without_a_working_source() { +fn shared_memory_without_a_working_source_is_a_copy_and_misuse_refused() { const TEST: &str = "dma-buf refusals"; on_device(|device| { let page = host_page(); @@ -1148,8 +1148,31 @@ fn shared_memory_is_refused_without_a_working_source() { *counted.lock().unwrap() += 1; Err(std::io::Error::other("no dma-buf")) }); - let failed = no_copy(device, &view, 0, 2 * page, failing); - check("a failing source", failed, not_importable); + // A view of its own, so that it lies in no copy the first buffer left. + let other = ram.view(&[(page, 2 * page)]); + let failed = no_copy(device, &other, 0, 2 * page, failing) + .unwrap_or_else(|error| panic!("{TEST}: a failing source: {error:?}")); + let copied = device.work_counts().copied_host_buffers_device_refused + - before_copies.copied_host_buffers_device_refused; + let backing = failed.host_backing(); + match refuses { + Some(true) => assert_eq!( + (backing, copied), + (Some(HostBacking::Copied), 2), + "{TEST}: a failing source: a copy, for the device's refusal" + ), + Some(false) => assert_eq!( + (backing, copied), + (Some(HostBacking::ImportedByPointer), 0), + "{TEST}: a failing source: the pointer's import" + ), + None => eprintln!( + "{TEST}: a failing source, on {}: {backing:?}, {copied} copied for the device's \ + refusal", + device.name() + ), + } + drop(failed); let expected_calls = usize::from(refuses == Some(true)); if refuses.is_some() { assert_eq!(*calls.lock().unwrap(), expected_calls, "{TEST}: calls"); diff --git a/docs/API.md b/docs/API.md index 7409976ec..d913d1f8e 100644 --- a/docs/API.md +++ b/docs/API.md @@ -3110,8 +3110,10 @@ bound. - `metal2vulkan-degrade-copied-host-pages` (precision). `CopiedHostPages`: A no-copy buffer, a no-copy heap or a buffer's rebind was made over a copy of the caller's host pages in memory of the device's own, which no import maps (a heap's textures shadows of its bytes): - the caller's gate (`HostMemory::with_import_gate`) refused the pages' import, or the import the - device and the gate admitted failed, of the pointer or of the caller's dma-bufs (out of memory, or + the caller's gate (`HostMemory::with_import_gate`) refused the pages' import, or the device + refused the pointer's import and no dma-buf of the pages served it (no source given, or one that + failed or whose dma-bufs the device refused; RADV refuses shared memory, a `memfd` mapping among + it, `copied_host_buffers_device_refused`), or the import the device and the gate admitted failed, of the pointer or of the caller's dma-bufs (out of memory, or another Vulkan error, such as a driver out of the mappings the host kernel allows), or the runtime kept pages the kernel cannot pin (a dma-buf's mapping) from NVIDIA's driver, whose failed import of them breaks it (`RuntimeDriverDefect::UnpinnablePagesBreakHostMemory`), and no dma-buf diff --git a/docs/HOWTO.md b/docs/HOWTO.md index c2ec119fe..2e7e724b2 100644 --- a/docs/HOWTO.md +++ b/docs/HOWTO.md @@ -199,9 +199,10 @@ Linux) imports a pointer through amdgpu's userptr, which takes anonymous pages o `MAP_SHARED` mappings of a `memfd`, a shared memory object or any file (QEMU's `memory-backend-memfd,share=on` guest RAM among them). NVIDIA and lavapipe import the same memory. A no-copy buffer or heap over memory the device so refuses, made with no source of dma-bufs of its -pages (below), is a copy of the pages, announced ([Copied host buffers](#copied-host-buffers), -`WorkCounts::copied_host_buffers_device_refused`); a rebind to such memory without a source is -refused with `Unsupported`, `HostMemory`. +pages (below), or with one that fails or whose dma-bufs the device refuses, is a copy of the +pages, announced ([Copied host buffers](#copied-host-buffers), +`WorkCounts::copied_host_buffers_device_refused`); a rebind to such memory without a working +source is refused with `Unsupported`, `HostMemory`. No driver that pins imported pages imports a mapping the kernel cannot pin (`VM_IO` or `VM_PFNMAP`: a mapping of a dma-buf). NVIDIA's driver fails such an import as out of device memory and then fails @@ -423,8 +424,9 @@ happens where: for a buffer or rebind that lies in a live import or copy of the same bytes, memory whose GPU writes Metal's private option bit 24 drops, a rebind whose bytes moved in their page under a texture (below), or where the device refused the pointer before it; -- the device refuses the pointer of a no-copy buffer or heap made with no source of dma-bufs of its - pages: RADV refuses shared memory, a `memfd` mapping among it (`Device::imports_shared_host_pointers`, +- the device refuses the pointer of a no-copy buffer or heap, and no dma-buf of its pages serves + it (no source given, or one that fails or whose dma-bufs the device refuses): RADV refuses shared + memory, a `memfd` mapping among it (`Device::imports_shared_host_pointers`, `copied_host_buffers_device_refused`); a rebind to such memory is refused instead; - an import the device and the gate admitted fails, of the pointer or of the dma-bufs of the caller's source (out of memory, another Vulkan error: `copied_host_buffers_degraded`);