Commit Graph

77 Commits

Author SHA1 Message Date
77275065bc xdxr: check an update's source before refitting it; bound vertex reads by VertexCount
An update whose source is not a structure of this layout (one the title never
built, which D3D12 leaves undefined) made the refit follow its parent table
anywhere. MODE_CHECK now compares the copied header with the layout, and the
update records both tails: the refit runs when the check passes, a full build
when it fails. The refit walk follows only pointers to the layout's nodes.

A vertex index at or past the geometry's VertexCount is no longer read: its
triangle is inactive. XdxrTriangles carries vertex_count from the desc.

vk_xdxr_build_test: blas_vertex_count and eight update-source cases (zero,
random, another element count, garbage tree; large and small-sort).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gt9hwRYcpySx4P4ncQ3wD5
2026-11-26 07:50:38 +01:00
2e4ef18d85 docs/bvh.md: the BVH4 parent table's start and extent (BUILD-1390)
offsetToParents = 0x40 - (((offsetToNodes - offsetToElements) / 16) & ~127),
so the first box node's entry lands in [0x40, 0xc0); one entry per box unit
follows, and offsetToElements is their end rounded up to 128. The bytes
from 0x40 to offsetToElements are zero. Holds on all 272,874 streams of
core_bvh4.rpf and shared_minigame000_bvh4.rpf (272,858 box roots for the
extent); counts only.

totalSizeIn64BNodes + 1 also counts the level table's units, which have no
entry: that is why the header-only end missed on about 13,400 streams.

tools/bvh_packing_check.py checks the three rules (parent_offset,
parent_area_nonzero, parent_extent); the synthetic fixture moves to the
console layout for its four leaves and three BOX16 units.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:24:55 -05:00
338f242ad7 ASSET-520: combine independent BVH drawable window evidence (#6300)
Squash-merged after diff review of PR #6300 - ASSET-520: combine independent BVH drawable window evidence
2026-11-23 08:21:08 -06:00
4beffda88a bvh_match: leave out geometries by render bucket, not a shader-hash list (ASSET-349) (#6330)
Squash-merged after review of PR #6330 - bvh_match: leave out geometries by render bucket (ASSET-349)
2026-11-23 08:16:56 -06:00
a4d7182243 Restore #4098: xdxr_build_check failed on #2753's BLAS index check, not on the builder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:50:22 -05:00
18151aedfb Revert #4098: a second rewrite of the XDXR builder on top of #3315's, and xdxr_build_check fails with both
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:43:12 -05:00
b5ba3c7fc5 Merge pull request #4639 from shelbykb2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/design.md
2026-11-22 23:16:43 -05:00
4b276851a8 Merge pull request #4563 from chatadouille
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/bvh.md
2026-11-22 23:15:58 -05:00
1d9f6c21d2 Merge pull request #4525 from ScarionWorkspace
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:15:35 -05:00
8338cc4ba9 Merge pull request #4506 from Krashgamer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:15:22 -05:00
54b42ee3e0 Merge pull request #4431 from tedin7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:14:40 -05:00
2fa6e4b972 Merge pull request #4265 from NiiRoZz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:12:56 -05:00
b485351b8f Merge pull request #4202 from shelbykb2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/design.md
2026-11-22 23:12:18 -05:00
780e418463 Merge pull request #4199 from throny
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:12:15 -05:00
d46452f59d Merge pull request #4139 from undeadhuman37
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:11:40 -05:00
afb6da0af6 Merge pull request #4133 from NiiRoZz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:11:35 -05:00
c42b2cbd05 Merge pull request #4098 from NiiRoZz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:11:15 -05:00
a235fe13f0 Merge pull request #3794 from SuarezPM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/design.md
2026-11-22 23:08:31 -05:00
a049544715 image_bvh_census: split some-paths reads by position, clear saved masks on inner back edges
The summary now says, per category, how many sites have a some-paths read
before the next call in program order and how many have them all after a
later call. strip() also drops the saved-mask SGPRs, so a mask saved in one
pass of an inner loop cannot place a read in the next. The docs quote the
split instead of guessing causes, name the integer mnemonics, and no longer
mention word 0 (the base field belongs to #3794).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 20:44:00 -07:00
115413b464 docs: image_bvh corpus counts in the Ray tracing row and bvh.md section 7
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 20:43:50 -07:00
6b762b62a5 docs: RDNA2's tie rule for rays on a triangle edge, and how it was found
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>
2026-11-22 20:41:07 -07:00
73ab096615 docs: the measured RDNA2 triangle rule in the Ray tracing row
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>
2026-11-22 20:40:54 -07:00
8f412bbdef bvh: describe the entry framing of the nested packs in core_bvh4.rpf 2026-11-23 03:22:42 +01:00
d778482db0 docs/bvh.md: say which packs "two of them" means (review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 03:21:03 +01:00
ef7ee745eb docs/bvh.md: place the interior's BLAS in the nested packs of core_bvh4.rpf
The first 10 streams are the whole first nested pack (9FPR tag); the other
121 BLAS of the interior lie in 31 other nested packs. Counts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:58:45 +01:00
2988cbba69 docs/bvh.md: what the 0x40 instance key is not (ASSET-350)
Measured over all 269,106 instance descriptors of core_bvh4.rpf: the key is
two uniform populations (below 2^55 and full 64-bit) that follow the BLAS,
is not a hash of any drawable name (name set validated against 228,610 of
228,681 archetype keys), not an entity id or archetype key, and not shared
with the other descriptor streams. What it hashes stays Open.

Counts only; no keys, names or game bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:58:07 +01:00
8b0c4767d4 docs/bvh.md: where the BLAS of the §4a interior's other entities are (ASSET-351)
The first 10 streams of core_bvh4.rpf cover 10 of the interior's 242 entities.
Matching every BVH stream of core_bvh4.rpf and shared_minigame000_bvh4.rpf
against the interior's drawables, at all four LODs, finds a BLAS for 124 of its
143 archetypes (220 entities), all in core_bvh4.rpf: 23 built from the first
LOD and 101 from the second, which rpf9dump models does not export. One BLAS
per drawable, not per entity; the 115 archetypes past the first 10 streams lie
in a band of streams 231,012 to 261,585. 16 exported archetypes have none, 11
of them as the shader rule predicts, and one shader hash is both kept and left
out. Counts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:52:48 +01:00
59c3a1fc69 fix: bvh_index finds archives with os.walk so an unlistable sub-folder makes the run exit 1 (review) 2026-11-23 02:50:30 +01:00
e6e5347509 docs/bvh.md: the "aggregated room" BLAS are single drawables, placed by their interior (ASSET-322)
All 10 sample BLAS of core_bvh4.rpf match exactly one drawable each on a full
levels.rpf export with per-geometry counts; the two read as aggregated rooms are
baked room-dressing drawables. All 10 are entities of one interior archetype
(base list and two entity sets); a BLAS sits in interior space at E * M^-1.
The shader skip covers 7 hashes over these samples, not 2. The descriptor key
at +0x40 always comes with one transform, and distinct keys can share a BLAS
and its transform (whole pack, single-BLAS descriptors). Counts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:25:34 +01:00
bfde953968 docs/bvh.md: 64 bytes per element is a stride; the parent offset is usually negative (review on #4139)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 03:17:40 +03:00
1321c7a504 bvh_packing_check: count continuation streams once, test every guard
Joined continuation streams are counted as `continuation`; one that starts
in a later window is no longer counted there again as `raw`. Five more
synthetic cases cover too_many_children, child_not_a_node, invalid_child,
root_not_a_box and leaves_past_end. core_bvh4.rpf: kinds now sum to
565,596 as in docs/bvh.md §1, 271,637/271,637 still pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:17:01 +01:00
f4ec24236c ASSET-321: decode the BVH descriptor templates and tie 6,701 BLAS to them
The 24,832 "other descriptor" streams of core_bvh4.rpf are two templates,
told apart by the page word in the block that the 0x08 pointer addresses:

* 2,531 instance descriptors with N > 1 slots (the 208-byte record is the
  N = 1 case). The stream after each holds the BLAS of its non-zero entries
  back to back; each entry's low u32 is that BLAS's declared end rounded up
  to 256. 2,531/2,531 pass and 6,701 BLAS are tied; the N = 1 entry rule
  holds for 269,106/269,106 records.
* 22,301 table streams (page word 0x1): K sorted u32 values and K 32-byte
  items. None is followed by a BVH stream, and no key or value matches
  anything beyond chance.

tools/bvh_groups.py reproduces the template and buffer counts, with
synthetic tests. docs/bvh.md gains §3.2a with the layouts, the rule,
the tested non-links and what stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:52:58 +01:00
280f2bce84 docs/bvh.md: the 0x130 "u16 table" is three header words; no prim remap table (ASSET-329)
Counted over all 272,864 complete bvh4 streams with tools/bvh_index.py:
offsetToPrimRemap is 0 on every one; rootNodePtr lands in the node region on
all but 16 single-leaf streams (tri0 root); the element region is numElements *
64 rounded up to 128; offsetToParents is a multiple of 4, negative on 237,347.
The section 4 "u16 table at 0x130" is those words read as u16s. Where the
parent array starts stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:37:49 +03:00
2c108e91bd bvh_packing_check: the §4a packing holds on every BVH4 stream (ASSET-330)
A geometry-free check of the dehydrated packing that bvh_rehydrate reads:
level table, group fit, child counts and override masks, child pointer
targets and widths, one parent per node and leaf, vertex-order bytes and
stored overrides inside sceneBounds. 272,874 of 272,874 streams of
core_bvh4.rpf and shared_minigame000_bvh4.rpf pass; docs/bvh.md gets the
counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:34:49 +01:00
ba288b5b5c XDXR builder: radix-tree BVH (Karras) instead of four consecutive children (D3D-410)
The GPU builder grouped four consecutive Morton-sorted elements per node,
level by level. Those groups ignore where the Morton prefix changes, so
sibling boxes overlapped and a ray took about twice the traversal steps.

It now builds a binary radix tree over the same sorted keys (Karras 2012,
ties broken by sorted position) and keeps the inner nodes at an even depth
as the BOX32/BOX16 nodes, each taking its children's children (2 to 4),
numbered in sorted order by a scan (root = node 0). Boxes are filled by one
bottom-up pass: each element writes its slot box and merges it into its
parent's accumulator with atomics; the last child to arrive carries on.
The arrival counter's atomicAdd has acquire-release semantics instead of a
memoryBarrierBuffer, since the pass is divergent and SPIRV-Cross before
MSL 3.2 lowers memory barriers to threadgroup_barrier. Refit reuses the pass
through the parent table.

TRI1 pairing (#3315) pairs triangle children of one node; the build records
each element's tree pointer so a paired sibling finds its TRI1 slot. The
node count depends on the keys: the layout reserves (3N - 2) / 4 nodes, the
header counts the nodes written (plus the BOX16 spare unit after the last
one), so compaction gives the rest back. Refit copies a source by its
header size. check-build reports traversal steps per ray.

Steps per ray: 5,000 random triangles 42.0 -> 23.0, BOX16 43.9 -> 23.7,
paired 7,200-triangle grid 37.6 -> 19.5. Build 1M triangles: RTX 5090
5.50 -> 5.99 ms, Radeon gfx1036 iGPU 133 -> 180 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:26:38 +01:00
dbfbb386a4 docs: the BVH base is also measured on the native instruction
@TheMrBeez ran image_bvh_intersect_ray and image_bvh64_intersect_ray through
tools/hw_oracle on gfx1036 over hand-built box32 nodes: dword0 (P >> 8) + 0x10
with node 0|5 and (P >> 8) + 0x08 with node 0x800>>3|5 both traverse the node at
P + 0x1000, so address = base * 256 + (node & ~7) * 8 and the base and the node
offset add; the control reads the decoy. Recorded in bvh.md 7b. The Ray tracing
row drops the "a GPU can't confirm the rule" sentence: it was about the triangle
rule, and hw_oracle can run the native instruction, so that measurement is a
follow-up rather than an impossibility.

Docs only; test_docs_links, test_docs_repo_paths, test_docs_design_rows,
test_docs_table_rows and test_docs_list_items pass.
2026-11-22 20:21:01 -03:00
c2f3eaa308 XDXR builder: a spare unit after BOX16 nodes (translator reads 112 bytes per box node)
tools/rdna2spirv.py's image_bvh_intersect_ray loads a box node's BOX32
bounds (112 bytes) before it selects BOX16 or BOX32, and the root is the
last node, so a BOX16 root was read 48 bytes past the structure. A BOX16
layout now ends with one zeroed 64-byte unit (MODE_INIT clears it); the
D3D12 test's BOX16 BLAS is 39,040 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:30:14 +01:00
649a26064e XDXR builder: second review pass (refuse updates without ALLOW_UPDATE, rotation coverage, docs)
- xdxr_check refuses PERFORM_UPDATE without ALLOW_UPDATE (D3D12 requires
  it): a structure built without it may be paired, and a refit would leave
  its TRI1 children reading wrong vertices.
- blas_paired_rotations: a grid whose triangles start at varied vertices,
  so pairs use all nine (TRI0, TRI1) rotations; check-build asserts it
  ("all_rotations"). Before, the sibling rotation kd = 1 never occurred.
- BOX32 cases now say "box16": false, so a stray BOX16 is caught too.
- docs/bvh.md cites the one traced BOX16-related datum (docs/xdxr.md: a
  bottom-level path needing MINIMIZE_MEMORY and a stream value above 10),
  notes that world-space BLASes only get looser boxes; README says pairing
  saves no memory yet and the BOX16 switch is assumed; comments rewrapped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:30:14 +01:00
b8c07f8ccf XDXR builder: pair sibling triangles into TRI0/TRI1 leaves
A bottom-level build without ALLOW_UPDATE now pairs triangles, as the
console builder does in its offline BLASes. The pass that writes the nodes
above the leaves pairs a triangle with a later sibling (among that node's at
most four children) that shares an edge in the opposite direction (the same
vertex bits), from the same geometry, both active. The first triangle is
rotated to put the shared edge in slots 1 -> 2, the sibling's third vertex
goes in slot 3, its primitive in PrimitiveIndex2, and each node type's remap
byte returns D3D12's barycentrics for its own vertex order.

The node keeps one child per triangle with its own box, so the tree, the
layout and the sizes do not change; the TRI1 child points at the first
leaf and the sibling's leaf is left unused. Pairs never cross nodes: one
thread owns each rewritten leaf and each parent-table entry. A refit
rewrites the leaves one triangle each, so the layer does not pair builds
with ALLOW_UPDATE (xdxr_pair), and record_blas ignores `pair` for updates.

check-build now compares barycentrics as well as hits, and checks a case's
"pairs" field: at least one TRI1 node, or none. New cases: paired grids
(BOX32 and BOX16), a transform, a mixed scene, the radix path, and two that
must not pair (pairs split across geometries, edges shared in the same
direction), plus a D3D12 BLAS without ALLOW_UPDATE. Mutating the geometry or
the direction rule, or the remap byte, fails check-build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:30:06 +01:00
00c63805c2 XDXR builder: BOX16 inner nodes for MINIMIZE_MEMORY bottom-level builds
A bottom-level BuildRaytracingAccelerationStructure with MINIMIZE_MEMORY now
writes BOX16 inner nodes (64 bytes, half boxes) instead of BOX32 (128 bytes):
the same tree, about a fifth smaller. Prebuild info, the build and its refits
take the choice from the same flags (xdxr_box16), so the sizes stay exact.
Top-level builds keep BOX32 (world space: a half's step is 2 m at 2 km).

Each child box is rounded outward from the exact box kept in scratch, in
integer code (packHalf2x16's rounding is implementation-defined; AMD rounds
toward zero). Past the half range a bound goes to +-inf outward and +-65504
inward, so empty slots stay empty; below the smallest normal half it goes to
0 or +-2^-14, never a denormal a flushing decoder would shrink.
tools/xdxr_bvh.py half_round gets the same denormal rule, and check-build now
compares every BOX16 word bit for bit with encode_box16 of the exact box of
the triangles under it.

Tests: five blas_box16_* cases in vk_xdxr_build_test (radix and small sort,
an inactive triangle, values past 65504 and below 2^-14, a refit), and a
MINIMIZE_MEMORY BLAS plus its in-place update through the D3D12 API in
d3d12_xdxr_rt_test (prebuild and postbuild sizes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:29:47 +01:00
e7358e681b Merge upstream/main into real-bvh-core
Resolve the VKC_HEAP_INIT/VKC_HEAP_FILE overlap by keeping both: INIT seeds VA 0 (main), FILE loads at an offset and grows the buffer (this branch).
2026-11-22 19:01:41 -03:00
33e00a4e92 real BVH: the descriptor base is the 256-byte-unit field
The nonzero-base measurement falsifies the earlier mask. The game passes
ptr >> 8 in the descriptor's dword0 (0x10 for a structure at VA 0x1000), and
the |0x30 its shader ORs is only the temporary root-load address. The original
<< 8 is correct at base 0 and at 0x1000; the GPU returns the CPU walker's
children at both. This commit restores the translator and the test fixture to
main and keeps the measured result in docs/bvh.md 7b and the Ray tracing row.
2026-11-22 18:59:43 -03:00
2c51fb2d5c rdna2spirv: the game's BVH descriptor base is a byte address with flags
The game's RT shaders build the BVH descriptor base as (ptr & ~0xFF) | 0x30: a
byte address with flags in the low bits, not the 256-byte-unit field the
emulation assumed (base40 << 8). Masking the low byte fixes the address; a
non-zero base moved every node by 256x the flags.

The semantic test now runs the masked-base case (dword0 0x1030 -> base 0x1000,
node at 0x1040) and fails under the old shift. Measured with the first real
core_bvh4 BLAS (docs/bvh.md 7b): header at VA 0, root 0x4CABC; the game RT
shadow CS returns the CPU walker's children in the same order on the RTX 2060.
2026-11-22 18:40:19 -03:00
7664b31c82 Merge pull request #2712 from Davide 2026-11-22 15:11:28 -05:00
f7283f05d0 Merge pull request #2423 from Jolymmiles 2026-11-22 15:10:46 -05:00
45ec44426c bvh_match: --write stores the matched geometry, and docs/bvh.md says how to rebuild the sample set
The matcher could identify the drawable's geometries but had no way to hand them to tools/bvh_rehydrate.py,
so the recipe §4a implies could not be followed end to end. --write DIR now writes one float3 buffer and one
uint32 index buffer per matched geometry plus an export.json (the instance transform recorded, not applied to
the vertices), which is the shape bvh_rehydrate.py already takes.

docs/bvh.md §7 gains the four steps to rebuild the sample set from the user's own copy - bvh_index, a
levels.rpf window, bvh_match with --write, bvh_rehydrate - with the counts to check them against, and the root
parent-table entry the runtime layout must hold (0xFFFFFFFF, as the GPU builder writes and #2625 validates).
Nothing of the samples enters the repository; the two excluded shader hashes stay with the user.

Checked on the sample pack: --write on one identified sample produced buffers of the same sizes as the earlier
reference export of that BLAS (732/816, 2,736/2,808, 492/576 bytes), and rehydrating them with the recorded
transform gave the declared 18,880 bytes. Synthetic tests: two cases added (the buffers and export.json; nothing
written when no candidate is consistent), 18 in total.
2026-11-22 19:31:23 +01:00
4e646b96c1 Merge pull request #2712 from Davide 2026-11-22 13:17:15 -05:00
72a1fe7dc7 Merge pull request #2428 from Davide 2026-11-22 13:15:15 -05:00
49f6da4aa8 Merge pull request #2264 from SirAmong 2026-11-22 13:13:34 -05:00
ad88c19e97 xdxr_build: radix scan writes offsets apart from the counts, correct on MoltenVK 1.4.2
The scan read each digit count and stored its prefix sum over it. MoltenVK 1.4.2's SPIRV-Cross
(6c09849f; MoltenVK main pins aa217aeb, also affected) moves a load through a pointer bitcast
from a uvec2 past a later store to the same address, so the MSL read back the sum it had just
written. The radix path (more than 1,024 elements) then lost and duplicated elements:
blas_three_sort_tiles and blas_refit_in_place failed xdxr_build_check in 10 runs out of 10.
SPIRV-Cross 38abe362 fixes it upstream.

The prefix sums now go to their own scratch array (XdxrLayout::scratch grows by 64 bytes per
tile), so no invocation stores to a word whose loaded value it still uses. xdxr_build.inc
regenerated with glslc (shaderc 2026.4) --target-env=vulkan1.2 -O -mfmt=c.

Tested on an Apple M3 Max, macOS 27.3: xdxr_build_check passes 10 runs out of 10 on Homebrew
MoltenVK 1.4.2 (0/10 before), MoltenVK 5189f8de with SPIRV-Cross 57e4efcc, KosmicKrisp and
llvmpipe. The full native ctest passes 36/36 on each driver, with the same two skips as before.
AI-assisted.
2026-11-22 22:09:22 +04:00