The depth bounds test works (#82); faster defaults; textures are on the card before the character bake; one host copy per placed texture
- The depth bounds test (#82 by Kaivyyy, as is): a pipeline that enables it is made from a DEPTH_STENCIL1 stream under its own library name, and the title's OMSetDepthBounds reaches the host list. Before, such draws passed at every depth. On the test machine (RTX 4070) the first room is lit by its lamp for the first time: walls, table, bunks. - Defaults: what shaders wrote is copied back by a thread of its own (stage 2), wide copy-back, card copies from 1 MiB up to 1,024 MB, and 256 lists in the air. About 230 ms a frame where it was about 400. Off: VICTORY_RELAY=0, VICTORY_WIDE_BACK=0, VICTORY_CARD_BUFFERS_MIN_MB=16 VICTORY_CARD_BUFFERS_MB=512, VICTORY_LATE_WAIT_LISTS=128. - Textures picked by index are uploaded while loading and before a draw of the title's decoration bake, which samples them by index and runs once (VICTORY_EARLY_TEXTURES_MS, VICTORY_BAKE_TEXTURES_MS; 0 turns each off). - Placed textures are keyed without the filler words of their description: two views that differed only there each had a host copy (VICTORY_PLACED_FILLER=1 keeps the old key). - VICTORY_TEXTURE_ROOM_PERCENT (90, unchanged) sets how full the card may get before textures picked by index wait. Known: the first room's walls are still missing in some launches, and shaded areas are too dark (the bounce light has no ray-tracing structure to trace yet). Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
8f80e08663
commit
d8bd2af52e
8 files changed
+761
-76
No files matched your search
@@ -1829,7 +1829,10 @@ pub(crate) fn relay() -> bool {
|
||||
/// both wait for everything.
|
||||
fn relay_exact() -> bool {
|
||||
static ON: OnceLock<bool> = OnceLock::new();
|
||||
*ON.get_or_init(|| relay() && std::env::var_os("VICTORY_RELAY").is_some_and(|v| v == "2"))
|
||||
// Stage 2 unless `VICTORY_RELAY=1` asks for the first one (the default
|
||||
// since the walls of the first room were found drawn in every run with
|
||||
// this set and in fewer than half without it).
|
||||
*ON.get_or_init(|| relay() && std::env::var_os("VICTORY_RELAY").is_none_or(|v| v == "2"))
|
||||
}
|
||||
|
||||
/// Told when something joins [`LINE`], for the thread that lands flights
|
||||
@@ -1919,7 +1922,10 @@ mod relay_tests {
|
||||
}
|
||||
|
||||
/// The most host lists in the air before the flights are settled
|
||||
/// (`VICTORY_LATE_WAIT_LISTS`, 128; 32 settled the flights three times a
|
||||
/// (`VICTORY_LATE_WAIT_LISTS`, 256; `=128` is the value before: with the
|
||||
/// relay it stopped the submitting thread twice a frame for 92-103 ms in
|
||||
/// all while the card stood idle 64-113 ms a frame, runs 158, 159 and 162;
|
||||
/// 32 settled the flights three times a
|
||||
/// frame in run 92 and 64 still 1.3-1.7 times in run 99, with 12,919 tables
|
||||
/// asked and none refused; watch "tables asked, N refused"): their dynamic
|
||||
/// descriptor slots, upload
|
||||
@@ -1928,7 +1934,7 @@ mod relay_tests {
|
||||
fn late_most() -> usize {
|
||||
static MOST: OnceLock<usize> = OnceLock::new();
|
||||
*MOST.get_or_init(|| {
|
||||
std::env::var("VICTORY_LATE_WAIT_LISTS").ok().and_then(|v| v.trim().parse().ok()).unwrap_or(128).max(1)
|
||||
std::env::var("VICTORY_LATE_WAIT_LISTS").ok().and_then(|v| v.trim().parse().ok()).unwrap_or(256).max(1)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2816,6 +2822,27 @@ impl Host {
|
||||
})
|
||||
}
|
||||
|
||||
/// Whether the host GPU supports the depth bounds test; logged once.
|
||||
pub(crate) fn depth_bounds(&self) -> bool {
|
||||
static BOUNDS: OnceLock<bool> = OnceLock::new();
|
||||
*BOUNDS.get_or_init(|| {
|
||||
let mut options = D3D12_FEATURE_DATA_D3D12_OPTIONS2::default();
|
||||
// SAFETY: writes `options` of the given size.
|
||||
let ok = unsafe {
|
||||
self.device
|
||||
.CheckFeatureSupport(
|
||||
D3D12_FEATURE_D3D12_OPTIONS2,
|
||||
(&raw mut options).cast(),
|
||||
size_of_val(&options) as u32,
|
||||
)
|
||||
.is_ok()
|
||||
};
|
||||
let supported = ok && options.DepthBoundsTestSupported.as_bool();
|
||||
tracing::info!(supported, "host depth bounds support");
|
||||
supported
|
||||
})
|
||||
}
|
||||
|
||||
/// A new list, open for recording.
|
||||
pub(crate) fn new_list(&self) -> windows::core::Result<HostList> {
|
||||
#[cfg(feature = "diagnostics")]
|
||||
|
||||
Reference in new issue
Block a user