Repository navigation
Conversation
…release Registry::place skips superseding a live target when a newer placement at the same VA has the same texels (for example an R9G9B9E5 sampled view over an R32_UINT UAV target whose owned page range differs by a trailing page), but Registry::release omitted that check when scanning for remaining newer overlaps. Releasing a transient overlapping placement therefore transferred supersession of the target to its own live same-view alias instead of remapping it. Share a single same_view helper across Registry::place and Registry::release so releasing or removing a transient overlap remaps the target whenever only same-view aliases remain.
|
merge-check AI-written and posted by Foniass without a human check of each point. |
What changed
same_view(new, old)helper incrates/xcl/src/hle/d3d12x/placements.rs(new.desc.format != 0 && new.va == old.va && new.desc.same_texels(&old.desc)) used by bothRegistry::placeandRegistry::release.Registry::release, excluded same-view aliases (!same_view(q, &old)) when searching for another live overlapping placement to inherit a released placement'ssupersededtarget list.hle::d3d12x::placements::tests::releasing_transient_overlap_remaps_target_with_same_view_aliascovering both creation orders (same-view SRV alias created before or after a transient overlap) and verifying that a second non-same-view overlap still keeps the target superseded without attaching the same-view alias.Why
Commit
2c2bce36excluded same-view aliases (e.g. a UAV target and a same-address/same-texels SRV view of it) from superseding each other inRegistry::place, butRegistry::releasedid not apply the same!same_view(q, &old)predicate when transferring a released placement'ssupersededlist to remaining live overlaps. As a result, if a transient different-layout placement overlapped a UAV target and its same-view SRV alias and was later released or removed,Registry::releasetransferred the UAV target's supersession onto the same-view SRV alias instead of remapping the target. That left the UAV target permanently unmapped (supersededby its own SRV view) until the SRV alias itself was destroyed.Tested
origin/main(3b6a91ed):cargo test -p xcl --lib placements::testsfailed atreleasing_transient_overlap_remaps_target_with_same_view_alias(left: [],right: [1], same-view SRV alias kept UAV target superseded).cargo check --workspace --all-targets: passed with 0 errors and 0 new warnings.cargo test -p xcl --lib placements::tests -- --nocapture: 14 passed, 0 failed.cargo build --workspaceandcargo build --release -p xcl: succeeded.cargo test --workspace -- --test-threads=4(on RTX 5070 Ti with DXC1.9.2609.5):xcl --lib2582 passed, 29 ignored, 4 failed (all 4 are the pre-existingorigin/main3b6a91edsplit-wave64 geometry test failures:gpu::dxil::geometry_tests::gpu_geometry_msg_gs_done_records,gpu::dxil::geometry_tests::msg_gs_done_emits_in_dxil,gpu::dxil::lower_geom::tests::gpu_epilogue_filters_oob_triangles_and_no_store_emits,gpu::dxil::lower_mem::stage_guard_tests::geometry_export_rejected);cargo test --workspace --exclude xcl -- --test-threads=4: 0 failed.xcl-smokeon NVIDIA GeForce RTX 5070 Ti:Baseline (
mainancestor):This PR:
Not tested
origin/main(3b6a91ed) geometry test failures listed above are untouched by this PR.AI use
Used an AI coding assistant to audit
crates/xcl/src/hle/d3d12x/placements.rs, write the causal regression test and fix, and run the build, test, and smoke verification steps.