Skip to content

startup: name the causes of a refused placed build and accept PERFORM_UPDATE with a source structure - #1799

Closed
tedin7 wants to merge 1 commit into
R0Y00:mainfrom
tedin7:x2w-frontier-placed-update
Closed

tedin7 wants to merge 1 commit into
R0Y00:mainfrom
tedin7:x2w-frontier-placed-update

Conversation

@tedin7

@tedin7 tedin7 commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Related to #870 and #1758 (no Fixes). resolve_placed_build collapsed six different refusals into one opaque E_INVALIDARG and refused every update build. This names the causes and accepts PERFORM_UPDATE with a source structure. d3d12_memory_srv.inl and placed_buffer_range are untouched.

Changes

  • src/startup_stubs/placed_build.h: a standard-C++-only part with PlacedBuildCause (ok, unaligned, not_placed, wrong_state, range, update_without_source, source_without_update, source_unaligned, source_not_placed, source_wrong_state, source_range, source_dest_partial_overlap), cause_name, ranges_overlap and check_update_shape. The Windows declarations stay below, under _WIN32.
  • resolve_placed_build returns the same E_INVALIDARG and still publishes nothing on a refusal, and now logs x2w-dxr placed build refused: <cause> (<dest|scratch|source> at title 0x...) once per cause.
  • With PERFORM_UPDATE, the source goes through the same placement lookup as the destination, unchanged (a live placed buffer in the acceleration-structure state, 256-byte aligned). The scratch is sized by UpdateScratchDataSizeInBytes. The update may run in place (source == destination) or write another structure; a source that partly overlaps the destination is refused. Nothing is published unless all three addresses resolve.
  • tests/placed_build_causes_check.cpp (registered as placed_build_causes): the device-free rules, including both aliasing outcomes and the boundaries. tests/dxr_placed_build.h (used by dxr_placed_build_{hardware,warp}): six refused updates (no source, source without the flag, unaligned, unmapped, wrong state, partial overlap), an in-place update and an out-of-place one with its interior offset kept.
  • Notes in docs/experiments.md.

Verified (Linux)

Not verified

  • The WARP and hardware runs (dxr_placed_build_*) need Windows and were not run here; they should be run in CI or on Windows Server 2025. The device cases of the fixture are untested.
  • No update build is recorded or dispatched: tests/cpu/placed_dxr_provider.cpp is unchanged, because recording an update needs a changed trace helper.
  • The resolver cannot tell whether the source was built with ALLOW_UPDATE, which an update needs.

AI-assisted; commands listed were executed locally.

@tedin7
tedin7 force-pushed the x2w-frontier-placed-update branch from c453064 to 0e1e570 Compare November 24, 2026 19:06
@tedin7

tedin7 commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Closing this draft for now to help keep the open PR queue manageable; the branch stays preserved on the fork so it can be reopened once the queue clears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant