startup: name the causes of a refused placed build and accept PERFORM_UPDATE with a source structure #1799
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1799
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1799/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@tedin7 on GitHub · 2026-11-24 18:50 UTC · original
tedin7:x2w-frontier-placed-update→main· +302 −15 · 6 files · 1 commits · closed without mergingRelated to #870 and #1758 (no
Fixes).resolve_placed_buildcollapsed six different refusals into one opaqueE_INVALIDARGand refused every update build. This names the causes and acceptsPERFORM_UPDATEwith a source structure.d3d12_memory_srv.inlandplaced_buffer_rangeare untouched.Changes
src/startup_stubs/placed_build.h: a standard-C++-only part withPlacedBuildCause(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_overlapandcheck_update_shape. The Windows declarations stay below, under_WIN32.resolve_placed_buildreturns the sameE_INVALIDARGand still publishes nothing on a refusal, and now logsx2w-dxr placed build refused: <cause> (<dest|scratch|source> at title 0x...)once per cause.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 byUpdateScratchDataSizeInBytes. 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 asplaced_build_causes): the device-free rules, including both aliasing outcomes and the boundaries.tests/dxr_placed_build.h(used bydxr_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.docs/experiments.md.Verified (Linux)
g++ -std=c++17 -O2 -Wall -Wextra -fsanitize=address,undefinedontests/placed_build_causes_check.cpp: no warnings, passes.placed_build.h, each failing the check, original restored: in-place update refused, partial overlap accepted, overlap boundary off by one, source alignment unchecked, update flag without source accepted.-fsyntax-onlyond3d12_xs_device.cpp(only the MSVC-only__try/__exceptoflocal_log.h, as onmain) and ontests/cpu/placed_dxr_provider.cpp, which includes the fixture header.git diff --check origin/main...HEAD,tests/docs_links_check.py,tests/bidi_controls_check.py: pass.git merge-tree: no conflicts withmain, #1766, #1787, #1788, #1789, #1744, #1726. #1441 already conflicts withmainon its own.Not verified
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.tests/cpu/placed_dxr_provider.cppis unchanged, because recording an update needs a changed trace helper.ALLOW_UPDATE, which an update needs.AI-assisted; commands listed were executed locally.
@tedin7 on GitHub · 2026-11-24 19:14 UTC · original
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.
Pull request closed