Structure builder and rays: dispatches counted in threads, empty slots never entered, pages that are not there never hit; vertex signatures as DXC orders them
From DexNom/VIctory (GPL-3.0-or-later) bc3cd4b0 and 5f4c3df4: - DispatchX's flag 0x20 says the counts are threads (bc3cd4b0). Taken for groups, a rehydration stage ran up to 64 times its threads and stored over the structures after its own. The lanes past the count leave at once, in every builder program of one dimension without a group barrier (there: in two, by digest). VICTORY_THREAD_DIMENSIONS=0: as before. - A child that is not there may have inverted infinite bounds: it was entered at minus infinity, came first and ended the walk (bc3cd4b0). - A node in a page without a copy reads zeros, a child and a box: no hit (bc3cd4b0). - Signature rows in the order of their names; vertex outputs interpolated as the title's PSV0 says; an unread input packed beside a per-vertex one is constant too (5f4c3df4), with their tests. Every shader is translated again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
0769cc9dc8
commit
bc83b16387
11 files changed
+443
-44
No files matched your search
@@ -196,8 +196,11 @@ pub fn boxes(children: &[u32; 4], boxes: &[[f32; 6]; 4], ray: &Ray, sort: bool)
|
||||
}
|
||||
let enter = near[0].max(near[1]).max(near[2]);
|
||||
let leave = far[0].min(far[1]).min(far[2]);
|
||||
// A box whose minimum x is NaN is switched off.
|
||||
if !b[0].is_nan() && leave >= enter.max(0.0) && enter < ray.extent {
|
||||
// A box whose minimum x is NaN is switched off. A child that is not
|
||||
// there may have inverted infinite bounds, which every ray enters at
|
||||
// minus infinity: it would be first of the sorted children and end
|
||||
// the walk before them (DexNom/VIctory bc3cd4b0).
|
||||
if children[n] != NONE && !b[0].is_nan() && leave >= enter.max(0.0) && enter < ray.extent {
|
||||
ids[n] = children[n];
|
||||
distances[n] = enter;
|
||||
}
|
||||
@@ -287,6 +290,17 @@ pub fn half_to_f32(h: u16) -> f32 {
|
||||
pub(crate) mod tests {
|
||||
use super::*;
|
||||
|
||||
/// An empty slot's inverted infinite bounds do not come before the
|
||||
/// children a ray enters (after DexNom/VIctory bc3cd4b0).
|
||||
#[test]
|
||||
fn an_empty_slot_is_never_entered() {
|
||||
let inside = |x: f32| [x - 1.0, -1.0, -1.0, x + 1.0, 1.0, 1.0];
|
||||
let (up, down) = (f32::INFINITY, f32::NEG_INFINITY);
|
||||
let bounds = [inside(30.0), [up, up, up, down, down, down], inside(10.0), [up, up, up, down, down, down]];
|
||||
let ray = Ray::new([0.0; 3], [1.0, 0.0, 0.0], 100.0);
|
||||
assert_eq!(boxes(&[8, NONE, 16, NONE], &bounds, &ray, true), [16, 8, NONE, NONE]);
|
||||
}
|
||||
|
||||
/// The smallest 16-bit float not below `x` (`up`) or not above it.
|
||||
pub(crate) fn f32_to_half(x: f32, up: bool) -> u16 {
|
||||
let mut best: Option<u16> = None;
|
||||
|
||||
Reference in new issue
Block a user