RT ray sanity guard may be compiled away: isnan/isinf without SignedZeroInfNanPreserve #1096
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream#1096
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while bisecting a GPU hang (2026-10-25): a source-identical-value change to
rtHitLocalLights(690930d47c, now reverted and re-landed only in the M2 REQ kernels as b72b5a6a92) made the NON-queueDeferRtSplitLighthang on an RTX 5090 (TDR, no page fault, stuck inside the kernel that traces shadow rays inline). The change altered no value on any path; it only changed the driver's codegen (213 -> 211 registers).The only open-ended loops in that kernel are hardware traversals (
while (rayQueryProceedEXT)). A traversal that never returns is the #1049 failure: a NaN/Inf ray reachingrayQueryInitializeEXT. Our guardrtRaySaneusesisnan/isinf, but Vulkan lets the driver assume floats are never NaN/Inf unless the shader declaresSignedZeroInfNanPreserve, which none of our shaders do. Whether the driver folds those checks away can depend on surrounding code -- so a codegen shift can silently remove the guard and let an invalid ray through.Fix (A/B on the owner's box): test finiteness on the bit pattern in
rtRaySane(and any other NaN/Inf guard in front of ray queries / loop bounds):(floatBitsToUint(x) & 0x7F800000u) != 0x7F800000u, which the compiler cannot fold. Then re-test the original 690930d47c shape in DeferRtSplitLight to confirm it no longer hangs. Related: #1049.