Views are made beside the heaps the card sees and copied in whole
Measured on the RX 7900 XTX (indirect::tests::descriptors_written_under_readers): a thread that makes texture views in a slot of a shader-visible heap lets the card see a descriptor that is neither the old one nor the new one in 4 % of its reads (35 of 822 million: the driver clears it and fills it step by step). Copied from a CPU-only heap: none in 8,582 million reads, and three times as fast (51 ns against 149). Title threads and our passes rewrite slots while submissions run whose shaders pick them; three device losses of 2026-11-25 (play-1125-0203, n02, n03) were reads of memory no view names. Every slot of the host heaps (views, raw twins, null views, constant buffers, samplers) is now made in a slot of the thread's own in a heap the card does not see and copied in. VICTORY_VIEW_COPY=0: made in place, as before. A raw twin whose view begins between two multiples of 16 (35 a frame, left as the title's unbounded view) is made from the 16 bytes below and its descriptor moved on, if it is the one AMD's raw buffer descriptors are; null otherwise. indirect::tests::textures_read_in_another_dimension (a measurement): a view read in another dimension or level than its own gives zeros or its own texels: not a cause. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
59c1f2fc1d
commit
02f36e4440
3 files changed
+723
-53
No files matched your search
@@ -286,12 +286,13 @@ pub(crate) static SYNCED: [std::sync::atomic::AtomicU64; 6] = [const { std::sync
|
||||
/// Nothing while no heap page changed.
|
||||
#[cfg(windows)]
|
||||
pub(crate) fn sync_line(frames: f64) {
|
||||
let [twins, as_is] = [0, 1].map(|i| host::TWINS[i].swap(0, std::sync::atomic::Ordering::Relaxed));
|
||||
let [twins, moved, lost] = [0, 1, 2].map(|i| host::TWINS[i].swap(0, std::sync::atomic::Ordering::Relaxed));
|
||||
if twins > 0 {
|
||||
tracing::info!(
|
||||
"raw twins of buffer views made per frame (VICTORY_RAW_VIEWS=0: none): {:.0}, of them {:.1} as the title's view is (it does not begin on 16 bytes)",
|
||||
"raw twins of buffer views made per frame (VICTORY_RAW_VIEWS=0: none): {:.0}, of them {:.1} that do not begin on 16 bytes ({:.1} null)",
|
||||
twins as f64 / frames,
|
||||
as_is as f64 / frames
|
||||
moved as f64 / frames,
|
||||
lost as f64 / frames
|
||||
);
|
||||
}
|
||||
let [pages, looked, mirrored, micros, tabled, later] = [0, 1, 2, 3, 4, 5].map(|i| SYNCED[i].swap(0, std::sync::atomic::Ordering::Relaxed));
|
||||
|
||||
Reference in new issue
Block a user