Repository navigation
hk: set up G17P ray tracing only for devices that enable it; keep test assertions in release builds - #32
Merged
Conversation
Three host tests relied on assert() but did not undefine NDEBUG. The package build sets b_ndebug, so test-hk-host-as dropped its staging-layout call and crashed, and the lifetime and execution-allowance tests checked nothing. Undefine NDEBUG before <assert.h>, as the other hk tests do.
test-gen1-wait and test-hk-rt-inlining undefined NDEBUG before the NIR headers. In a b_ndebug build that declares the out-of-line nir_validate_shader(), which libnir does not provide then, so the tests fail to link and the build stops. Undefine it just before <assert.h>, as the other hk tests do.
hk_device_init_accel_struct_state() created the native ray-tracing state for every G17P device on a kernel that supports it: the 11 MB ray query program image with its 630 fixed code binds, the acceleration-structure tables, and the profile flags that make every queue reserve render SCS. The kernel sizes each render context's free list from that reservation, so a device that never traces a ray held a render pool of about 103 MB instead of 23.5 MB, on top of the user memory for the image. No acceleration structure, ray query or ray-tracing pipeline can exist on a device that enables none of the ray-tracing features, so create the state only when one of them is enabled. Other devices keep the state a G17P device has on a kernel without native ray tracing, and their queues are created without a render SCS layout. Shaders compile differently for the two kinds of device: ray-query shaders use the native query ABI, and Poly's geometry and evaluation lowering runs extra passes under the native profile even without queries. Add the decision to the shader feature key, which every graphics and compute shader cache key hashes, including pipeline binary keys and module identifier lookups, so neither the in-memory nor the disk cache hands one kind of device a binary built for the other. Ray-tracing pipelines exist only on ray-tracing devices. Refuse a deserialized shader that needs the native ray-query state on a device without it. Ray-tracing devices are unchanged. Other GPUs and kernels cannot enable these features, so their state and cache keys are unchanged as well.
DjDeveloperr
force-pushed
the
aurora/g17p-rt-on-demand-20261022
branch
from
October 22, 2026 23:07
e8cc0dd to
43fe12d
Compare
Author
|
Rebased onto aurora-wip c363804 (the Borealis identity commit); no conflicts. Neo (A18 Pro, G17P) results on the new base: a render-only Vulkan device now gets the plain 24 MB render free list instead of the ray-query-sized one. Ray-query CTS sample: 1,990 pass, 10 not supported, 0 fail. Validated render and compute stress clients pass. Meson: 100/100. |
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
assert()without#undef NDEBUG, so the release (b_ndebug) package build checked nothing and the host-AS test crashed. Two NIR tests undefined NDEBUG before the NIR headers, which broke the release link (nir_validate_shader).Meson: 100/100 on aurora-wip dde4825.