Repository navigation
Conversation
…= extent The box branch of image_bvh_intersect_ray / image_bvh64_intersect_ray tested tnear < extent. On an AMD Radeon RX 6800 (gfx1030, AMD driver 26.11.2, Windows 11, tools/hw_oracle raw kernels) the hardware keeps a child when max(tnear, 0) <= extent, an ordered compare: - tnear equal to the extent is a hit; - a negative extent (-inf included) or a NaN extent misses every child; - an extent of +-0 keeps the boxes around or starting at the origin; - +inf keeps a box at tnear = +inf. 36 rows in three kernels, 6 control rows that reproduced earlier measured words bit for bit. The rule was one of eleven candidates registered before the runs and the only one that fit all 36; tnear < extent fit 7. The change is one comparison: OpFOrdLessThanEqual(FMax(0, tmin), tmax) in place of OpFOrdLessThan(tmin, tmax). It adds no SPIR-V instruction or word per site. The sort key and the NaN-skipping are unchanged. tests/semantic/test_image_bvh_box_hw.py gains the 36 rows as EXTENT_CASES, run in the 32-bit form as measured. All 241 existing measured rows still pass. Unmodified main fails 29 of the 36 new rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Ray tracing row of docs/design.md said the box extent boundary was not measured. It now states the measured rule, max(tnear, 0) <= extent, and what is still not measured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested I ran For the negative control, I used the translator from AI-assisted. |
|
Verified commit
Reviewed AI-assisted (Gemini, Antigravity). |
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 256eedcbf on Windows 11 (semantic tests need the repo's no--I invocation): test_image_bvh_box.py -> 4 tests, OK; test_image_bvh_box_hw.py -> 2 tests, OK; git diff --check clean.
The Ray-tracing row now states the measured RDNA2 extent rule, and the translator's box test expectation is aligned with it; the hardware test covers the measured extents. No blocking issue.
|
Tested Commands and results:
Note: Red control: AI-assisted (Devin). |
Claimed as SHADER-835 (#4571 (comment)). Follow-up to #3567, which listed the extent boundary as not measured. cc @controldebils
What and why
On RDNA2 a box child is kept when max(tnear, 0) ≤ extent.
mainteststnear < extent(from #3567, which had only extent 100). One compare in the box branch ofGen.image_bvhchanges (OpFOrdLessThan(tmin, extent)→OpFOrdLessThanEqual(max(tnear, 0), extent)); the emitted SPIR-V is the same size.Measurement
AMD Radeon RX 6800 (gfx1030), AMD driver 26.11.2, Windows 11,
tools/hw_oracleraw kernels, 2026-11-23. Three kernels, 36 new rows plus 6 controls copied from rows that already reproduce #3567 (all 6 bit-exact). BOX32, sorting on, 32-bit form, default descriptor, exact binary inputs (some extents are the next/previous float of one). Each kernel differs from a box kernel that had already run only in bound and ray constants.Candidate rules and their predicted words were written down before the runs:
main, #3567)What the rows show:
tnear ≤ extent.Tested (256eedc on
98fa503f)python -m unittest discover -s tests/semantic -p "test_image_bvh*.py": 13 tests OK. The 36 rows are intest_image_bvh_box_hw.pyasEXTENT_CASES; all 241 existing measured rows of rdna2spirv: BVH box test as measured on RDNA2: NaN planes skipped, near/far by direction sign (SHADER-650) #3567 still pass.mainfails 29 of the 36 new rows.tests/test_docs_*.py,test_ci_registration.py,test_text_encoding.py: 43 passed.run_gpu_tests.py --filter bvhon the RX 6800:cs_bvh,cs_bvh32pass, expected words unchanged.test_loop_ballot_barrier, identical withmain's translator.Not measured
Denormal or −NaN extents, BOX16, sorting off, other descriptors (the game sets big_page, #4639), the 64-bit form on box nodes, inputs whose slab distances round, gfx1013 (the console).
tools/xdxr_bvh.py's box test models the public XDXR software path and already uses clamped entry ≤ extent, so it is unchanged. Thedocs/design.mdRay tracing row is also edited by #4202 and #4639 (different sentences).No game files involved. AI-assisted (Claude Code; an Opus worker prepared and ran the probes, I reviewed each kernel before it ran and re-ran the tests).
🤖 Generated with Claude Code