HANDOFF: PRs #80-#82, #85, #86

This commit is contained in:
ivall
2026-11-23 11:35:58 +01:00
parent bd174d5fb1
commit 9284dcdd58
+6 -1
View File
@@ -2105,7 +2105,12 @@ unsafe fn own_memory_if_larger_on_the_pc(this: *mut c_void, heap: usize, offset:
}
let h = pc_heap_desc(heap)?;
let st = state as u32 & PC_RESOURCE_STATES;
let hr = dev_create_committed_resource(this, &h.Properties as *const _ as usize, 0, d.as_ptr() as usize, st as usize, clear, riid, ppv);
let mut hr = dev_create_committed_resource(this, &h.Properties as *const _ as usize, 0, d.as_ptr() as usize, st as usize, clear, riid, ppv);
if hr < 0 && st != 0 {
// as in the past-the-end fallback: a state the PC refuses for this desc (e.g. UAV
// without the UAV flag) – COMMON rather than falling back to the overlapping placement
hr = dev_create_committed_resource(this, &h.Properties as *const _ as usize, 0, d.as_ptr() as usize, 0, clear, riid, ppv);
}
static N: AtomicU64 = AtomicU64::new(0);
if N.fetch_add(1, Ordering::Relaxed) < 8 {
let u = |o: usize| u32::from_le_bytes(x[o..o + 4].try_into().unwrap());