Skip to content

rdna2spirv: BVH triangle words as measured on RDNA2: raw scaled numerators, hardware tie rule, invalid rays - #4202

Open
shelbykb2 wants to merge 7 commits into
ItsNotRexed:mainfrom
shelbykb2:test/bvh-tri-hw
Open

shelbykb2 wants to merge 7 commits into
ItsNotRexed:mainfrom
shelbykb2:test/bvh-tri-hw

Conversation

@shelbykb2

@shelbykb2 shelbykb2 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Correction (2026-11-23, head f7aa10e): the tie rule

The tie rule in the first version of this PR was wrong in cases it had not measured. Its 49 tie rows all had z dominant and either det < 0 with d[kz] > 0 or det > 0 with d[kz] < 0, so triangle winding and the sign of d[kz] were never separated.

A second measurement on the same RX 6800 (gfx1030, AMD 26.11.2; 8 kernels, 256 cases through tools/hw_oracle: ties with x, y and z dominant, both windings, both signs of d[kz], every edge direction, equal |d| components) fits none of eight rules registered before it ran; the old rule gets 160 of 196 tie rows. Only the hit/miss decision on a zero edge is affected: words 1-3 matched on every row.

The rule now in the translator, with (tx, ty) the zero edge in the sheared frame with the d[kz] < 0 swap undone: ty == 0 ? sign(det)·tx > 0 : sign(d[kz])·sign(det)·ty > 0.

  • It was read off the x/y rows after the fact, then written down and used to predict a z-dominant kernel before that ran: 32 of 32, including all 10 rows where it and the old rule disagree.
  • It reproduces all 308 + 84 results of the first measurement and all 256 of the second. Hardware is watertight on all 76 shared-edge pairs and vertex fans measured.
  • With two equal |d| components, the rows that can tell the axes apart agree with the translator's x > y > z order; for |dx| = |dy| only the (+,+) sign pattern was separated.
  • Old translator against the new rows: 46 of 256 fail (none of the old 308). Now all 564 rows pass. +14 SPIR-V instructions (68 words) per site.

Tested at f7aa10e (rebased on 03b09a08), RX 6800: test_image_bvh*.py 10 tests OK; tests/test_bvh_tri_probe.py, docs and registration tests 43 passed; run_gpu_tests.py --filter bvh 2/2 (expected words unchanged: the fixtures' hit is not a tie). Full semantic suite and full pytest not re-run for these three commits. Earlier testers' results were on 20fe0375.

This is the tie follow-up claimed in #4421 (comment). Still gfx1030 only, exact binary fractions only.


New SHADER item, claimed in #3574: the triangle counterpart of SHADER-650 (#3567, boxes). AI-assisted (Claude Code).

Touches only the triangle branch of Gen.image_bvh. #3567 rewrites the box branch and the sort network of the same function; git merge-tree of the two conflicts only in the one-line Ray tracing row of docs/design.md, and the merged tools pass both PRs' tests. Whichever lands second rebases that row.

What was measured

AMD Radeon RX 6800 (gfx1030), AMD driver 26.11.2, Windows 11, 2026-11-22, through tools/hw_oracle raw kernels that write hand-built nodes into the oracle's buffer and trace one ray each. First, as a control, #3567's box rule: 31 of its cases and its own kernel in both forms, 39/39 result sets equal to its published words, including the cs_bvh root 68 48 40 miss. So that rule reproduces on a second RDNA2 chip.

Then the triangle step, node types 0–3: 21 dispatches, 308 single-lane rows and 896 lane results. The 32-bit and 64-bit forms, wave32 and wave64, and NSA and contiguous operands all give the same words.

With T, det and the edge functions U, V, W of the watertight test, and k = |d[kz]|³:

  • Hit: (k·T, k·det, k·b_i, k·b_j). Raw numerators over a shared denominator, as PAL's CreateBvhSrds comment describes mode 1, not the divided values the translator returned.
  • Miss: (copysign(inf, k·det), k·det, k·b_i, k·b_j). The weights come back on a miss too. det = 0 is a miss with +inf.
  • The supplied inverse direction is not used. The shear comes from the direction: with inv.z = 4 where 1/d.z = 2 the hardware gives t = 8, the old translation 16.
  • Invalid ray: a NaN anywhere in t max, origin, direction or inverse direction (an axis nothing else reads included), or an infinite origin, gives (inf, 1, 0, 0). The old translation could return a hit.
  • Range: t ≥ 0 is tested and t = 0 hits. There is no test against the ray extent (t max of 0, −1 or 7 still hits at t = 8); the consumer does that.
  • Ties: watertight (every shared edge gives exactly one hit, the fan vertex one of four), but not RADV's choice. A zero edge function from P to Q, (tx, ty) = Q − P in the sheared frame, passes when ty == 0 ? tx < 0 : sign(det)·ty > 0.
  • Bits: every zero word is +0, and a NaN is 0xFFC00000.
  • Vertex slots (TRI0 0,1,2; TRI1 1,3,2; TRI2 2,3,4; TRI3 2,4,0) and the remap byte are as the translator already had them: selector 3 reads U, the high nibble and the other bytes are ignored.

A consumer that divides by word 1 sees the same t and weights on every hit and +inf on every miss under both the old and the new translation. What it can see: the tie rows (14 of the 308 change hit/miss), the supplied-inverse rows (3), the invalid-ray rows (3), and zero-area or NaN inputs, where the old SPIR-V divided by zero or took FSign of a NaN.

Changes

  • tools/rdna2spirv.py: the triangle branch returns the measured words. The shear is multiplied through by |d[kz]|, so there is no division; zeros and NaNs are fixed on the integer side (a select to +0 and to 0xFFC00000), since SPIR-V leaves a NaN's bits to the driver; the miss word is 0x7F800000 | sign(word 1). About +2.5% per site (789 → 809 instructions, 3,825 → 3,913 words).
  • tests/semantic/test_image_bvh_tri_hw.py (new): all 308 single-lane rows and 84 lane results as data, each run through the translator in both forms and compared bit for bit.
  • tests/semantic/test_image_bvh_tri.py: the same checks with the measured words (word 1 is det, misses keep the weight numerators).
  • tools/bvh_tri_probe.py and tests/test_bvh_tri_probe.py (new): the probe, so the rows can be re-measured on another card. Triangle nodes only, every node inside the oracle's own buffer with an alignment guard.
  • docs/design.md Ray tracing row (box sentences untouched), docs/bvh.md §7a, a comment in cs_bvh32.asm.

Tested

On main aa2988c, RX 6800, AMD 26.11.2, Windows 11:

  • test_image_bvh_tri_hw.py: 392 results bit-exact. Negative control: on main's translator 179 of the 308 rows fail (165 differ, 14 raise on undefined SPIR-V).
  • python -m unittest discover -s tests/semantic: 7,459 tests; 7 failures and 2 errors, the same ones main has (7,456 tests there): test_loop_ballot_barrier, test_cmp_class_f64, and a test_mutations anchor for v_mul_legacy_f32. None is in BVH code.
  • pytest with LLVM_MC set: 13,908 passed, 13 failed, 127 skipped, against main's 13,890 / 13 / 127 with identical failing ids.
  • spirv-val: all 214 GPU-test shaders and tests/test_translate.py (581 passed) valid.
  • GPU: cs_bvh and cs_bvh32 pass with unchanged expected words (k·|det| = 1 on that scene's ray). Full run_gpu_tests.py 195/210 passed, 15 skipped, 0 failed; check.py 183 of 184, 1 skipped.
  • tests/test_bvh_tri_probe.py, docs and line-ending tests, python -m compileall -q make_game.py tools tests: OK.

Limits, stated plainly

  • gfx1030, not gfx1013. The console's chip was not measured.
  • The tie rule was fitted after seeing the data, to 49 rows that all have z as the dominant axis. Ties with x or y dominant are not measured.
  • All inputs are dyadic, so the arithmetic is exact and the rows say nothing about the hardware's rounding. The divided and multiplied-through shear give the same words on every row but one (d.z = +inf); choosing the latter rests on that one row.
  • kz ties (equal |d| components) give equal words either way, so nothing pins the order.
  • The probe's --oracle hw path through runner.open_oracle() has not run as such: the rows were measured with the same kernel text (hashes equal for all 14 kernels) through a driver that assembled with WSL clang-21, because there is no Windows AMD clang here.
  • Under --no-float-controls a driver may fold OpIsNan/OpIsInf away.
  • Not run: node types 6 and 7, the box extent boundary, and the descriptor with big_page set. The corpus's 716 call sites all use one descriptor, the value Mesa uses plus bit 123 (big_page in PAL's sq_bvh_rsrc_t), which no public driver sets for a BVH; I did not run it on memory that is not known to be in large pages.

How the corpus uses the words (counts only): at the 391 call sites where the node type could be traced, every one takes v_rcp_f32 of word 1 and uses words 0, 2 and 3 only as quotients, and word 1 otherwise only by sign, with its own t min / t max tests. 319 sites could not be traced; 7 of those use word 2 or 3 undivided.

Possible follow-up, not in this PR: tools/xdxr_bvh.triangle_test agrees with the hardware on 284 of the 286 hits both report and on the tie decisions, and differs at t = 0 (it misses), on one −inf vertex row and in the miss words.

No game data.

🤖 Generated with Claude Code

@bobcatchris

Copy link
Copy Markdown
Contributor

Apple M2 data point. Tested head 20fe037 on Apple M2 (Mac14,3), macOS 26.4, MoltenVK 1.4.2 (direct), subgroup 4..32, llvm-mc 23.1.6, Python 3.13.18, with a clean full build on AppleClang 17.

python -I scripts/run_gpu_tests.py --filter cs_bvh --build runtime/build/linux: 2 shaders translated, 2 pass spirv-val; 2/2 passed — cs_bvh and cs_bvh32 both report "device: Apple M2 (subgroup 4..32)" with 0 mismatches. Adds an Apple/MoltenVK result to the AMD measurements in the PR body. Head fetched unchanged into a separate worktree; no rebase/edit/push. Synthetic shaders and counts only; no game files.

AI-assisted.

@MKmajster

Copy link
Copy Markdown

Tested 20fe037 on NVIDIA GeForce RTX 3070 (Ampere, 32-wide), driver 617.42, Windows 11 24H2: pass.

  • run_gpu_tests.py --filter bvh with this branch's tools/ and fixtures: cs_bvh and cs_bvh32 PASS (2/2). main aa2988c on the same runtime build also passes 2/2, so the new triangle-word rule doesn't change these fixtures' traversal results on NVIDIA's driver.
  • python -m unittest discover -s tests/semantic -p "test_image_bvh_tri*.py": OK.

llvm-mc 23.1.6, SPIRV-Tools 2026.4, runtime built from main aa2988c. No game files. AI-assisted (Claude).

@CaravelaLabs

Copy link
Copy Markdown
Contributor

Automated test: 20fe0375 merged onto main aa2988cc on AMD Radeon 8060S (RADV GFX1151, RDNA 3.5), Mesa 25.2.8, Ubuntu 24.04, runtime rebuilt from this branch in a clean sandbox. Result: pass.

  • scripts/run_gpu_tests.py: 192/209 passed, 15 skipped (plain main: 192/209 passed, 15 skipped).
  • Python tests this PR touches: 10 passed, 799 subtests passed.

Same machine and setup as my earlier manual reports. AI-assisted (Claude Code).

@theswiss24

Copy link
Copy Markdown

Tested 20fe0375 (contains main aa2988cc) on NVIDIA GeForce RTX 4070 (Ada), driver 621.24, Windows 11 (26300), Vulkan SDK 1.4.363.1, llvm-mc 21.1.8, with test programs built from main aa2988cc (this PR changes no C++): pass.

LEONIDA_W64_EMULATE=1 python -I scripts/run_gpu_tests.py --build <main build>: 195/210 passed, 15 skipped, 0 failed, the same counts and skips as main. The changed fixture passes: PASS cs_bvh32 device: NVIDIA GeForce RTX 4070 (subgroup 32..32).

I did not run the new tests/semantic BVH tests separately. No game files.

AI-assisted (Claude Code).

@slopradish slopradish left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CPU verification: checked out pull/4202/head in an isolated worktree and ran pytest -q tests/semantic/test_image_bvh_tri.py tests/semantic/test_image_bvh_tri_hw.py: 10 passed, 799 subtests passed.

This is the triangle counterpart of the already-landed box rule, and the evidence is unusually strong: control reproduction of #3567's box words on a second RDNA2 chip, then 21 dispatches / 308 single-lane rows / 896 lane results across 32-/64-bit, wave32/wave64 and NSA/contiguous forms, with the raw measurement table written from the oracle outputs rather than by hand. The 799 subtests here check those words bit for bit through the real translator.

The key change — raw scaled numerators with k=|d[kz]|³ rather than divided values — is materially different from RADV's software path, and the PR explicitly records the RDNA2 tie rule that RADV gets wrong. The consumer-facing note (divide by word 1 yourself) is important and correctly documented.

I could not run the GPU fixtures; hardware measurements remain the author's. No game files or keys involved.

shelbykb2 added a commit to shelbykb2/Leonida that referenced this pull request Nov 23, 2026
…regression rows and probe kernels

tests/semantic/test_image_bvh_tri_hw.py: the data block now also holds the 256 single-lane rows of the tie
measurement (RX 6800, gfx1030, AMD 26.11.2, 2026-11-23; hand-built nodes and rays, the words the instruction
returned, both forms equal), written by work-bvhtri/ties/export_hw_table_ties.py; the ItsNotRexed#4202 rows are unchanged.
The translator before the tie rule change fails 46 of the new rows (92 subtests) and none of the old ones.

tools/bvh_tri_probe.py: builds the eight tie kernels too (tri_t1..t7 x / y dominant and equal |d|, tri_t8 the z
bridge); their lines are those of the reviewed specs the RX 6800 ran (module_sha256 matches). rule_words follows
the new tie rule. tests/test_bvh_tri_probe.py pins tri_t1 and tri_t8 and expects 564 single-lane cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shelbykb2

Copy link
Copy Markdown
Contributor Author

Pushed f7aa10e: three more commits correct the tie rule (details at the top of the description). The first version's rule was confounded and wrong for det > 0 with d[kz] > 0 and det < 0 with d[kz] < 0; a second RX 6800 measurement (256 cases, x, y and z dominant) fixes it, and the new rule predicted a held-out z kernel 32/32. Thanks @bobcatchris @MKmajster @CaravelaLabs @theswiss24 — your runs were on 20fe0375; cs_bvh/cs_bvh32 are unaffected (not a tie) and still pass here. AI-assisted (Claude Code).

shelbykb2 and others added 7 commits November 22, 2026 20:39
Native image_bvh_intersect_ray / image_bvh64_intersect_ray on an RX 6800 (gfx1030, AMD 26.11.2, tools/hw_oracle,
308 single-lane rows and 896 lane results, both forms equal) returns the watertight test's raw values scaled by
k = |d[kz]|^3: a hit is k*(T, det, b_i, b_j) and a miss (copysign(inf, k*det), k*det, k*b_i, k*b_j), with the shear
taken from the direction (the supplied inverse direction is not read), t >= 0 tested and no test against t max.
Every zero comes back +0 and every NaN 0xFFC00000; a NaN anywhere in the ray, or an infinite origin, gives
(inf, 1, 0, 0). The tie rule on a zero edge function is RDNA2's own: (tx, ty) = Q - P of the edge in the sheared
frame passes when ty == 0 ? tx < 0 : sign(det) ty > 0, not RADV's.

The triangle branch now computes those words with the shear multiplied through by |d[kz]| (no division), so U, V,
W and det carry |d[kz]|^2, and fixes zero signs and NaN bits with integer selects. Every input the measurement used
is defined SPIR-V (main divided by zero on zero-area triangles and took FSign of NaN). This form gives all 1204
measured results; a shear divided by d[kz] (its zero divisor guarded) gives 1203, all but d.z = +inf, the one row
that separates the two (a fit after the runs). Box nodes and the sort network are unchanged.

test_image_bvh_tri.py expected the normalised words (t/|det|, sign(det), ...) and a miss (inf, 1, 0, 0); it now
expects det and the plane's weight numerators (TRI3 of its quad has det 0.5). One image_bvh site grows from 789 to
809 SPIR-V instructions (3825 to 3913 words).

Co-Authored-By: Claude Opus <noreply@anthropic.com>
…test

tests/semantic/test_image_bvh_tri_hw.py holds every single-lane row of the triangle measurement on an RX 6800
(308 rows of 12 kernels: slots, both windings, misses, the remap byte, t max and t sign, zero area, NaN and inf in
the node and the ray, shared edges and vertices) and lanes 0, 15, 16, 31, 32 and 63 of the two 64-thread kernels
(84 results). Each runs through the translator in both forms, with contiguous or NSA address operands as measured,
and must give the hardware's four words bit for bit. All are asserted; main's translator gets 129 of the 308 rows
(14 more raise on undefined SPIR-V). The data block is written from the raw outputs by a script, not by hand.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
…_bvh as a probe

Builds the 14 tools/hw_oracle raw kernels of the RX 6800 measurement (308 single-lane cases, 7 cases on 64 lanes in
wave32 and wave64, NSA and contiguous operands), runs them one dispatch each through the in-tree runner and compares
both forms with the measured rule and, with --oracle translator,hw, with the translator on the mini interpreter. The
lines are the ones that ran: built into a module by asm.module_text they hash to the reviewed specs.

What a kernel may do is the measurement's safety review: nodes only in whole 64-byte slots of the node region inside
the oracle's buffer, with a guard band after it; a run-time check that the region is 256-byte aligned before any
BVH instruction; triangle node types only (no box nodes, no types 6/7, no extent rows) and one descriptor (w2 =
0xFFFFFFFF, w3 = 0x81000000); outputs refused when the control word is missing, a destination was never written or
everything is prefill. The DRM launcher's 4096-dword limit skips the lane kernels on Linux. The docstring has the
WSL clang-21 command lines the measurement assembled with (not tried through the tool itself).

tests/test_bvh_tri_probe.py (no GPU): the cases equal the rows of test_image_bvh_tri_hw.py, the rule gives their
measured words, three kernels' text is pinned, the safety checks refuse bad kernels, and a stand-in oracle with the
measured outputs passes (one planted word fails, prefill or a missing control word stops the run).

Co-Authored-By: Claude Opus <noreply@anthropic.com>
docs/design.md: the triangle sentences of the Ray tracing row now give the rule measured on an RX 6800 (gfx1030,
AMD 26.11.2, 2026-11-22, the kernels tools/bvh_tri_probe.py builds, 1,204 results): the invalid-ray result, the shear from the
direction, k = |d[kz]|^3 times (T, det, b_i, b_j), the miss words, t >= 0 without an extent test, +0 and
0xFFC00000, RDNA2's tie rule, how the translator computes them, what a consumer dividing by word 1 sees and where
the earlier normalised words differed, and what was not measured. The box sentences are unchanged.

docs/bvh.md 7a: the translator's triangle words against the software step's. cs_bvh32.asm: the derivation of the
scene's triangle words follows the measured rule; the words are unchanged (k = 1 and |det| = 1 there).

Co-Authored-By: Claude Opus <noreply@anthropic.com>
…th x, y and z dominant

The triangle branch of image_bvh decided a zero edge function with the rule fitted to the 49 tie rows of the first
RX 6800 measurement (ty == 0 ? tx < 0 : sign(det) ty > 0). All of those rows had z dominant and either det < 0 with
d[kz] > 0 or det > 0 with d[kz] < 0, so winding and the sign of d[kz] were confounded, and the rule was wrong in
the cells it never saw.

A second measurement on the same RX 6800 (gfx1030, AMD 26.11.2, 2026-11-23; 8 kernels, 256 rows through
tools/hw_oracle: ties with x, y and z dominant, both windings, both signs of d[kz], every edge direction class,
tilted triangles with oblique rays, equal |d| components) fitted none of the eight rules registered before it ran.
The rule now used was read off its x/y rows and then predicted the z-dominant bridge kernel before that ran
(32 of 32 cases; 10 of them separate it from the old rule). With (tx, ty) = Q - P of the zero edge in the sheared
frame with the d[kz] < 0 swap undone, the edge passes when
    ty == 0 ? sign(det) tx > 0 : sign(d[kz]) sign(det) ty > 0.
It reproduces all 308 + 84 results of the first measurement and all 256 of the second. Each image_bvh site grows by
14 SPIR-V instructions (6 OpSelect, 4 OpFMul and their NoContraction decorations), 68 words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…regression rows and probe kernels

tests/semantic/test_image_bvh_tri_hw.py: the data block now also holds the 256 single-lane rows of the tie
measurement (RX 6800, gfx1030, AMD 26.11.2, 2026-11-23; hand-built nodes and rays, the words the instruction
returned, both forms equal), written by work-bvhtri/ties/export_hw_table_ties.py; the ItsNotRexed#4202 rows are unchanged.
The translator before the tie rule change fails 46 of the new rows (92 subtests) and none of the old ones.

tools/bvh_tri_probe.py: builds the eight tie kernels too (tri_t1..t7 x / y dominant and equal |d|, tri_t8 the z
bridge); their lines are those of the reviewed specs the RX 6800 ran (module_sha256 matches). rule_words follows
the new tie rule. tests/test_bvh_tri_probe.py pins tri_t1 and tri_t8 and expects 564 single-lane cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/design.md, Ray tracing row: the tie rule as measured with x, y and z dominant; that the first fit was
confounded (winding vs the sign of d[kz]) and wrong in the cells it never measured; that the rule was read off the
x/y rows post hoc and then predicted the z-dominant bridge kernel before it ran (32/32, 10 rows discriminating); the
256 new rows; which equal-|d| sign patterns the measured rows tell apart (all consistent with the translator's
>= order). Still gfx1030 only and dyadic inputs. docs/bvh.md 7a: one paragraph on the tie rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shelbykb2

Copy link
Copy Markdown
Contributor Author

Rebased on 7b7d73f8 after the merge round (the only conflict was in docs). Re-tested on the RX 6800: fresh build, `test_image_bvh*.py` 15 tests OK (now including #3567's box rows), probe/docs/registration tests 58 passed, `run_gpu_tests.py --filter bvh` 2/2 with main's new expected words. AI-assisted (Claude Code).

@Kev-Ball

Copy link
Copy Markdown

Tested 6b762b62 on an NVIDIA GeForce RTX 3080 Ti (32-lane subgroups), driver 620.73.04, CachyOS Linux 7.3.5-2-cachyos. I rebuilt the Vulkan harnesses from this revision and selected the NVIDIA device explicitly.

Ran scripts/run_gpu_tests.py --filter cs_bvh --require-pass with LEONIDA_W64_EMULATE=1: 2/2 translated, validated and passed (cs_bvh, cs_bvh32). The default-mode cs_bvh32 check passed separately. All 15 tests selected by unittest discover -s tests/semantic -p "test_image_bvh*.py" passed. The GPU fixtures exercise a non-tie hit; the edge-tie cases here are semantic coverage.

AI-assisted verification with synthetic inputs.

@sperm

sperm commented Nov 23, 2026

Copy link
Copy Markdown

Tested 6b762b6 (a re-test at the new head) on AMD Radeon RX 9070 XT (RADV GFX1201) and the Ryzen 7 9800X3D iGPU (RADV RAPHAEL_MENDOCINO, gfx1036), Mesa 26.2.6, Linux 7.3.4: pass, no regressions.

No game files. AI-assisted.

@lunarminus

Copy link
Copy Markdown

Tested 6b762b62 as it is (it already contains main up to 7b7d73f8) on an AMD Radeon 760M (RDNA3 iGPU, gfx1103, subgroup 32..64), RADV Mesa 26.3.1, CachyOS Linux: pass

  • The head already contains d0835dd9, so merging main at d0835dd9 was a fast-forward and the tree tested is 6b762b62 itself, based on main 7b7d73f8. main is now 98fa503f, 7 commits further (mods, runtime hooks and CI; nothing in the translator or tests/semantic). Those commits merge cleanly but were not tested. The runtime was built from the tested tree (RelWithDebInfo) with no errors.

  • python -I tests/test_bvh_tri_probe.py: 15 tests OK.

  • python -m unittest discover -s tests/semantic -p "test_image_bvh*.py": 15 tests OK.

  • Negative control: this PR's test_image_bvh_tri_hw.py and test_image_bvh_tri.py against 7b7d73f8's translator give 847 failures and 28 errors, so the rows catch the old rule.

  • pytest on the probe, docs (design rows, contract rows, links, tables, CLI flags, env vars), CI/ctest registration, line-ending, no-game-data and test_xdxr_bvh tests: 107 passed, 722 subtests passed, 0 failed.

  • scripts/run_gpu_tests.py, full suite:

    Mode Translated, spirv-val valid Passed Skipped Failed
    Default 221 / 221 202/217 15 0
    LEONIDA_W64_EMULATE=1 221 / 221 202/217 15 0
  • cs_bvh and cs_bvh32 PASS in both modes: device: AMD Radeon 760M Graphics (RADV PHOENIX) (subgroup 32..64). --filter bvh gives 2/2, and --filter cs_bvh --require-pass with LEONIDA_W64_EMULATE=1 gives 2/2.

  • Per-test comparison of every PASS/FAIL/SKIP line, in both modes:

    • Against 7b7d73f8 without the PR (same build, main's tools and fixtures, 202/217 passed, 15 skipped): no difference.
    • Against d0835dd9 without the PR (196/210 passed, 14 skipped): no test changes result. The 7 tests not in that run come from main, since the 7b7d73f8 run has them too:
      • 6 PASS: cs_smem_sconst_off, ps_far_branch, ps_sample_c_b, ps_sample_c, ps_texture_b_cl, ps_texture_cl.
      • 1 SKIP: ps_m2_literal (run by d3d12_m2_textured_test).
    • The PR adds no new GPU fixture.
  • Not run: tools/bvh_tri_probe.py --oracle hw (this card is gfx1103; the PR's measurement is for gfx1030). The full semantic suite and full pytest were not run either.

No game files. AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants