upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:10:46 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 15:10:46 -0500
commitf7283f05d071efaabcdb7c7a6de0fa083dae2cba (patch)
tree4f83948261d1e9ab90d5f2c6bc105aad709456f2 /docs
parent73e9dfd9a130e559043a05fbf11e66c99db05d65 (diff)
parentad88c19e971f3e8c5d54d0c9d0ea4c8ec1587330 (diff)
Merge pull request #2423 from Jolymmiles
Diffstat (limited to 'docs')
-rw-r--r--docs/bvh.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/bvh.md b/docs/bvh.md
index 2da342293..a3ffb98b8 100644
--- a/docs/bvh.md
+++ b/docs/bvh.md
@@ -473,6 +473,19 @@ the destination buffer:
473 instance's `ParentNode`; 473 instance's `ParentNode`;
4744. the header. 4744. the header.
475 475
476The radix sort's scan writes the prefix sums of the digit counts to their own scratch array, not over the counts.
477No invocation of the builder stores to a word and then uses a value it loaded from that word earlier. SPIRV-Cross
478`6c09849f`, in MoltenVK 1.4.2, breaks that pattern for a pointer made by `OpBitcast` from a `uvec2`
479(`GL_EXT_buffer_reference_uvec2`): it moves the load to where the value is used, after the store, and the load
480returns the new value. MoltenVK `main` at `5189f8de` pins SPIRV-Cross `aa217aeb`, which has the same bug.
481SPIRV-Cross [`38abe362`](https://github.com/KhronosGroup/SPIRV-Cross/commit/38abe362c57311a77808b7ec4d1d0d9ceb8d9370)
482fixes it. With the old in-place scan, the radix path (more than 1,024 elements) lost and duplicated elements on
483MoltenVK: `xdxr_build_check` found about 130 of 200 rays wrong in `blas_three_sort_tiles` and 210 of 300 in
484`blas_refit_in_place`, which refits a radix-sorted tree. Measured on an Apple M3 Max, the separate arrays pass
48510 runs out of 10 on Homebrew MoltenVK 1.4.2, on MoltenVK `5189f8de` built with SPIRV-Cross `57e4efcc`, on
486KosmicKrisp and on llvmpipe. A pointer from `OpConvertUToPtr`, which the translator uses, kept its load before the
487store in the same test.
488
476The tree's shape depends only on the element count. `XdxrLayout` therefore computes the result and scratch sizes 489The tree's shape depends only on the element count. `XdxrLayout` therefore computes the result and scratch sizes
477exactly when the build is recorded, and the same numbers can answer `GetRaytracingAccelerationStructurePrebuildInfo`. 490exactly when the build is recorded, and the same numbers can answer `GetRaytracingAccelerationStructurePrebuildInfo`.
478A triangle with a NaN vertex gets an empty box (D3D12 treats it as inactive). So do an instance with mask 0, one with 491A triangle with a NaN vertex gets an empty box (D3D12 treats it as inactive). So do an instance with mask 0, one with