upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--d3d12/crates/leonida-gpu/src/descriptor/host.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/d3d12/crates/leonida-gpu/src/descriptor/host.rs b/d3d12/crates/leonida-gpu/src/descriptor/host.rs
index d93c86929..f8b4d7ed9 100644
--- a/d3d12/crates/leonida-gpu/src/descriptor/host.rs
+++ b/d3d12/crates/leonida-gpu/src/descriptor/host.rs
@@ -6408,6 +6408,17 @@ void BY_FLOATS_OR_NOT(uint3 id : SV_DispatchThreadID) {
6408 }; 6408 };
6409 let memory = vec![0u64; 1 << 13]; 6409 let memory = vec![0u64; 1 << 13];
6410 let start = (memory.as_ptr() as u64).next_multiple_of(4096); 6410 let start = (memory.as_ptr() as u64).next_multiple_of(4096);
6411 // Give every placed view the same backing buffer. A loose-memory
6412 // window has its own origin, so start + 456 need not be on one of
6413 // its 456-byte elements.
6414 struct Backing(u64);
6415 impl Drop for Backing {
6416 fn drop(&mut self) {
6417 crate::shadow::unregister(self.0 as usize, self.0);
6418 }
6419 }
6420 crate::shadow::register(start as usize, start, 4096);
6421 let _backing = Backing(start);
6411 // SAFETY: a plain CPU-side heap of one view. 6422 // SAFETY: a plain CPU-side heap of one view.
6412 let cpu: ID3D12DescriptorHeap = unsafe { 6423 let cpu: ID3D12DescriptorHeap = unsafe {
6413 host.device.CreateDescriptorHeap(&D3D12_DESCRIPTOR_HEAP_DESC { 6424 host.device.CreateDescriptorHeap(&D3D12_DESCRIPTOR_HEAP_DESC {