Repository navigation
Conversation
The harness could only read the 0x280-byte synthetic bvh scene it builds itself. VKC_HEAP_FILE=<path>[@<offset>] copies a file into the heap, so a translated corpus shader can read a BVH, its descriptor blocks and the records from the user's work folder. Used to dispatch one of the game's RT compute shaders over a real GPU-built BLAS; the file is read at run time and never committed, so no game data enters the repository.
|
Tested
Two small points, neither blocking:
AI-assisted. |
|
Tested
No game files. AI-assisted (Claude Code). |
strtoull(..., 0) accepted a leading zero as octal (@0256 loaded at 0xae), and a sign or spaces. Parse decimal or 0x hex explicitly, cap the offset at 4 GiB, and document the two overlaps: bvh mode writes its synthetic scene after the copy, so 0x100..0x264 is overwritten there, and the output V# starts at heap offset 0. Reported by @wildheathen.
|
Thanks for the AMD/RADV pass and for running the whole suite and ctest, not just the new path; that is the coverage this needed. The two earlier nits from @wildheathen are fixed in |
|
Thanks, this is the strongest validation the harness has: eight real console BLAS, 1,647 steps against Both nits are fixed in
Your eight-BLAS run is cited in the PR body. AI-assisted. |
Keep both heap loaders: main's VKC_HEAP_INIT (VA 0) and this branch's VKC_HEAP_FILE (offset, auto-sized).
|
@JRamos1993 Thanks! |
Claimed in the coordination issue as: new RT item — real-BVH GPU harness + first game RT CS execution; the real-BLAS execution is #3794.
What and why
vk_compute_testcould only read the 0x280-byte synthetic BVH scene it builds itself (cs_bvh.asm). This addsVKC_HEAP_FILE=<path>[@<offset>], which copies a file into the heap at a chosen Xbox VA, so a translated corpus shader can read a real BVH, its descriptor blocks and the records. The file is read at run time only; nothing is committed.That feature is what made the first execution of one of the game's 64 RT compute shaders on a PC GPU possible, and it is also how the real console BLAS was traversed in #3794.
While this PR was in review,
maingainedVKC_HEAP_INIT(seeds the heap at VA 0 and requires the file to fit). The merge keeps both loaders:VKC_HEAP_INITat VA 0,VKC_HEAP_FILEat an offset and growing the buffer; the parser and overlap notes above are unchanged.Tested
core_bvh4BLAS; the first traversal call's children matchxdxr_bvh.intersect_node, same order (Ray tracing: the first real core_bvh4 BLAS on a GPU (the descriptor base is the 256-byte-unit field) #3794).cs_bvh/cs_bvh32unchanged; the same scene through the file gives the same eight words, and parsing/error cases behave. With eight console BLAS (2 to 21,814 leaves) rehydrated withbvh_rehydrate.py, oneimage_bvh_intersect_raystep per node over 48 rays per BLAS: 1,647 steps, all agree withintersect_nodeexcept 116 box ties (same children, float32 entry-distance order), 27 triangletvalues within float32 ulps of the vertices, and one shared-edge pair where each chooses a different triangle (watertight; one hit either way). Negative control: zeroing the BVH changes 38 of 64 lanes.run_gpu_tests.py185/199 native and withLEONIDA_W64_EMULATE=1, ctest 41/41 (the skips matchmain).spirv-valpass.Two review nits are fixed in
557a25ed: the offset is parsed as decimal or0xhex explicitly (a leading zero was octal:@0256loaded at0xae; signs/spaces are rejected; 4 GiB cap), and the comment documents the two overlaps (bvhmode overwrites0x100..0x264after the copy; the output V# starts at heap offset 0, so a file at@0shares bytes with it).No game data: the file path is supplied by the user at run time and nothing decoded is committed. AI-assisted.
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change in this PR.)