Repository navigation
gpu: isolate watch test resets from TLAS result reuse - #78
Merged
Merged
Conversation
simnJS
reviewed
Nov 25, 2026
simnJS
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, this looks right. Extracting forget_guards keeps the order of title_memory_remapped unchanged. serial() now resets only the guards and the page-read cache. Weak::ptr_eq is a sound identity check, since spare reuse counts only strong references. The forced reset reproduces the interleaving every time.
Nit, non-blocking: a doc comment on forget_guards would help. We'll merge once test and gpu-debug-layer are green.
AliceWood
marked this pull request as ready for review
November 25, 2026 18:09
simnJS
approved these changes
Nov 25, 2026
simnJS
left a comment
Collaborator
There was a problem hiding this comment.
All checks are green. Approving, thanks.
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.
What and why
The watch tests clear their guards before each run. Their setup used the runtime's full-address-space remap notification, which also evicted spare ray-tracing buffers from other tests. Reset the guards and the shared page-read cache directly. Actual title remaps still notify all three subsystems in their original order.
The TLAS rebuild test now runs the watch setup after the first buffer becomes available for reuse. It checks that the same two buffers alternate across four rebuilds and that the final ray hits. Weak references identify the allocations without keeping them busy. A replacement allocation can have the same GPU address. This removes the five-attempt loop and its process-wide log of released ranges.
Fixes the TLAS reuse case reported in #54. The issue tracks other tests as well.
Depends on: none
Area
xtp-gpuwatch setup and ray-tracing tests.Tests
cargo xtask pr-checkpasses on my machineCompared upstream
458cd45and head765e1e5on Windows 10 build 19045.3693, RTX 4080, driver 32.0.16.1742.Strict hardware diagnostics,
rt::tests::rt_tlas_rebuilds_reuse_a_result_nothing_holds: the original test passed alone. With the new test and the original watch setup, the forced interleaving failed the allocation-identity assertion. The identical test passed with the fix, including the ray hit.Ran the TLAS test together with
watch::tests::at eight test threads, 16 times per revision. All 16 batches passed on each revision (27 tests per batch, 5 ignored). Upstream had its retry loop. The PR has none.Ran the
rt,watch,shadowandtextureunit tests together withXTP_TEST_ADAPTER=hardware,XTP_REQUIRE_GPU=1, diagnostics and eight test threads. Both revisions had 113 passes, 9 ignored, and the same two failures creating a root signature (E_INVALIDARG):rt_missing_tlas_writes_every_ray_as_a_missandrt_spliced_trace_binds_t240_as_a_root_srv_with_bounded_root_srvs.On WARP, all 26 enabled watch tests passed. The installed WARP driver reported no DXR when the TLAS test required a GPU.
cargo xtask pr-check --base origin/mainon hardware passed formatting, both Clippy configurations, policy and commit conventions. Workspace testing stopped atprecook_fills_the_cache_once_for_every_build_of_the_translatorandprecook_keeps_pipelines_across_translation_keys. The same two tests failed on unmodified upstream. Both runs reported that compute pipelines require shader model 6.6 and the local runtime exposes 6.5. An initial run in a restricted Windows session stopped earlier at the precook process-lock test on both revisions. That test passed in the normal Windows session.A supplementary
pr-checkwithXTP_TEST_ADAPTER=nonereached the GPU unit suite. Its only failure,resource::tests::host_descriptions_are_ones_warp_creates, creates a WARP device directly. The same test failed on upstream with the same resource description and HRESULT.Provenance
AI assistance: Codex wrote the patch and ran the checks on the contributor's machine. It read the issue discussion, the contribution guide, and the XTP watch, shadow, resource and ray-tracing code directly. The earlier WARP frequency was reported by another contributor. The before/after runs above are local measurements.
Checklist