1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// SPDX-FileCopyrightText: Copyright 2026 Au-Zone Technologies
// SPDX-License-Identifier: Apache-2.0
//! Windows D3D11 texture backing: the process device, adapter selection and
//! the texture storage. Windows-only; the layout table lives in
//! `crate::d3d11_layout` so every platform tests it.
//!
//! The module is gated once, on its declaration in `lib.rs`.
pub
// Both backends: a constructor handed a raw texture reads its geometry
// here rather than inferring it from a caller's shape, and three of the
// four surfaces that do so build `dynamic`. See the module's own comment.
// The texture storage is reachable only through the `static` backend's
// `TensorStorage`; `dynamic` forwards every tensor call to the C ABI and never
// constructs one, so compiling it there would be dead code.
pub
pub use ;
pub use ;
pub use ;
/// The `ID3D11Device*` the tensors *this build* allocates actually live on.
///
/// [`device`] answers for this copy of the crate. On the `dynamic` backend
/// that copy allocates nothing: every tensor is created inside
/// `libedgefirst_tensor`, whose own copy owns the process device, so the
/// honest answer to "which device are my textures on" comes from asking that
/// library through `ef_d3d11_device`. On `static` the two are one object.
///
/// **Borrowed**: no reference is transferred, and the caller must never
/// `Release` it.
/// Installs a host-owned `ID3D11Device*` into the copy of this crate that
/// allocates.
///
/// [`use_external_device`] installs into this copy's own slot. On the
/// `dynamic` backend that slot is never read: the library allocates, and it
/// consults its own slot and the rendezvous. A host that installed here and
/// then allocated would silently get the library's own freshly created
/// device instead, with no error to say so. Routing the call through
/// `ef_d3d11_use_external_device` puts the pointer where the allocation reads
/// it; the library then publishes it through the rendezvous, so this copy
/// adopts it as well.
///
/// # Safety
///
/// As [`use_external_device`]: `ptr` must be a live `ID3D11Device*` and must
/// stay live until the first device use takes the reference.
pub unsafe
/// The `dynamic` backend's [`backend_device`]: the library's device, not this
/// copy's.
/// The `dynamic` backend's [`backend_use_external_device`].
///
/// # Safety
///
/// As [`use_external_device`].
pub unsafe