dxr: retarget copied recipe build.dest to destination address #40

Merged
ahmetbagci8 merged 1 commit from upstream-pr/40 into dev 2026-11-29 20:55:27 +00:00
ahmetbagci8 commented 2026-11-29 18:10:40 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by ahmetbagci8 on 2026-11-29T18:10:40Z.


Problem

In crates/victory-gpu/src/dxr/keep.rs, Book::copied(dest, source, frame) cloned source's Arc directly under key dest without updating
ecipe.build.dest = dest.

When dest is later evicted and requested again by a TLAS (keep::want(dest, frame)), keep::wanted(&table) yields (dest, recipe) where
ecipe.build.dest still points to source. In dxr/native.rs, both ottom::bottom(..., &recipe.build, ...) and keep::remember(recipe.origin, &recipe.build, frame) key off
ecipe.build.dest, so:

  • source is rebuilt and overwritten instead of dest;
  • dest is never inserted into able;
  • every subsequent TLAS referencing dest re-queues dest and rebuilds source repeatedly.

Additionally, the None branch removed dest from self.recipes without clearing self.wanted.remove(&dest).

Fix

Clone
.build with uild.dest = dest when recording a copied recipe, and remove dest from self.wanted when source has no recipe. Extended _recipe_named_without_a_structure_is_made_again_once to cover both cases.

Verification

  • cargo test -p victory-gpu --lib dxr::keep::tests (2 passed, 0 failed)
  • cargo clippy -p victory-gpu --tests (0 warnings)
  • cargo test -p xtask english (5 passed, 0 failed)
<!-- greyfinch-sync:edsuuu/VI-BR-PORT:issue:5553601497 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/40). Originally posted by [ahmetbagci8](https://github.com/ahmetbagci8) on 2026-11-29T18:10:40Z. --- ## Problem In crates/victory-gpu/src/dxr/keep.rs, Book::copied(dest, source, frame) cloned source's Arc<Recipe> directly under key dest without updating ecipe.build.dest = dest. When dest is later evicted and requested again by a TLAS (keep::want(dest, frame)), keep::wanted(&table) yields (dest, recipe) where ecipe.build.dest still points to source. In dxr/native.rs, both ottom::bottom(..., &recipe.build, ...) and keep::remember(recipe.origin, &recipe.build, frame) key off ecipe.build.dest, so: - source is rebuilt and overwritten instead of dest; - dest is never inserted into able; - every subsequent TLAS referencing dest re-queues dest and rebuilds source repeatedly. Additionally, the None branch removed dest from self.recipes without clearing self.wanted.remove(&dest). ## Fix Clone .build with uild.dest = dest when recording a copied recipe, and remove dest from self.wanted when source has no recipe. Extended _recipe_named_without_a_structure_is_made_again_once to cover both cases. ## Verification - cargo test -p victory-gpu --lib dxr::keep::tests (2 passed, 0 failed) - cargo clippy -p victory-gpu --tests (0 warnings) - cargo test -p xtask english (5 passed, 0 failed)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
edsuuu/VI-BR-PORT!40
No description provided.