Structure builder: fences around its buffer atomics (VICTORY_BVH_FENCES=0: none)

Its threads take turns through atomics; what one wrote before its atomic has to
be seen by the one after it. The console's waits for writes are not in the
translated code. After beloooo's 72e748ea (VIctory-Belobug-AMD).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 11:09:40 -06:00
1 parent 810efe5829
commit 30f46c92a9
3 files changed
+29

No files matched your search

+8
View File
@@ -180,6 +180,14 @@ pub fn group_sync() -> u8 {
})
}
/// Whether buffer atomics of the ray-tracing structure builder stand between
/// two fences (`VICTORY_BVH_FENCES=0`: they do not). Part of the
/// translation: the shader cache keys on it.
pub fn builder_fences() -> bool {
static ON: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
*ON.get_or_init(|| std::env::var_os("VICTORY_BVH_FENCES").is_none_or(|v| v != "0"))
}
/// The clean-up passes that run over a translated program before it is
/// written (`bitcode::opt`): a set of that module's pass bits. Every pass
/// is exact, so the switch is for telling a translator fault from a