Repository navigation
Port upstream world-unblock chain (PRs #1127, #1122, #1215, #1198) - #2
Merged
Merged
Conversation
…ll its views The title writes physical pages through one view (a pool) while the GPU reads them through another (map_alias). A read-only guard on one view did not see writes through the other, so its host copy kept what it first took (seen as stale mesh data in the world, before the page faults). xmem keeps an index of the views showing each physical page; guarding a block also guards its aliases, and a write to one opens them all. Only blocks with guarded aliases are looked up on a write, so a huge kernel write range costs no more than before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tomicCompareExchange.i64
…tersection - An access whose address traces to no root parameter but which the program computes (a pointer it loads, picks or builds) now goes through an address map instead of failing: the host copies of title memory sorted by address, searched in the shader, then read or written through a raw view in the heap. Loads, stores and 32-bit atomics, scalar and vector. An address in an SGPR the hardware fills (the spill table) is still refused. - image_bvh_intersect_ray and image_bvh64_intersect_ray are emulated: the node is read through the map and tested as Microsoft's software model of the instruction does (SoftwareBvhIntersectRay in the XDXR traversal headers): box16 and box32 nodes with sorting, the four triangles of a leaf with the watertight edge rules, both triangle return modes. - A descriptor the program reads as numbers (a buffer's address, an acceleration structure's location) reads the console words of the view heap's slot from a copy the host keeps, 32 bytes a slot. HostShader gets address_map and descriptor_words; the shader cache format moves to VSH2.
- The address map lists the host copies of title memory made so far, each through raw views in dynamic slots of the list's view heap, cut where copies overlap (the innermost wins, as shadow::find picks) and at 512 MiB. It is made once per list and view heap; the copies it lists are brought up to date when the list is submitted. - Each view heap keeps the console words of its slots: buffer views, constant buffers and acceleration structures as buffer descriptors at their title address, written whenever a slot is made. - Pipelines get the two root SRVs their shaders ask for; a draw or dispatch that cannot have them is dropped. What shaders write through the map stays in the host copies.
…py into the title, VICTORY_PROFILE WriteProcessMemory asks the kernel about the destination region first (NtQueryVirtualMemory, about 2 ms a call in the title's big pools), so the copy back after a world submission spent over a second there. write_mapped now calls NtWriteVirtualMemory directly (falls back to WriteProcessMemory if the symbol is missing) and reports an unmapped page the same way. copy_mapped no longer calls VirtualQuery before copying into title memory; the check runs only after the first attempt failed, so a copy into fully mapped memory costs one call. Diagnostics only: VICTORY_PROFILE=<ms> samples every thread's stack and prints the hottest ones every 5 s. Measured (i7-13700KF, RTX 4070 Super, world stage, DRED off): copy back of one frame 1.5 s -> 0.13 s. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwHrL6fhkpeG9ByE1rJxrt
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…ndows)) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Summary
Second upstream port wave — the world-rendering blockers, merged into the fork with semantic conflicts resolved. All merges applied cleanly; one test-integration fix was needed.
Upstream PRs ported
dx.op.atomicBinOp.i64/atomicCompareExchange.i64, fixes atomic handle caching and SFI0 feature flags.guard()inwatch.rsgains aknown_mappedparameter, skippingVirtualQuerybefore copies into title memory.NtWriteVirtualMemory(upstream-measured 1.5s → 0.13s/frame) plusVICTORY_PROFILEinstrumentation invictory-gpu/src/profile.rs.address_map/descriptor_wordsfields onHostShader,emit/lower/bvh.rs,emit/address_map.rs,victory-gpu/src/address_map.rs, docs updates.Fork-side fixes
emit/mod.rs:HostShadertest initializer now setsaddress_map: false/descriptor_words: false(new required fields).watch.rstests:guard(a, a + BLOCK)calls updated to the 3-arg signature (known_mapped = true— the test views are known mapped).Testing
cargo test --workspace --locked --target x86_64-pc-windows-msvc: all pass except the 15victory-shaderemit tests that require an SM 6.6 GPU/WARP device — identical failures onmain(no GPU on this machine).cargo clippy --workspace --all-targets --locked -D warnings: clean.Link to Devin session: https://app.devin.ai/sessions/39a24dfe2c184165b42b2108a96286b6
Open in Devin Desktop: https://app.devin.ai/desktop/session/39a24dfe2c184165b42b2108a96286b6?variant=devin
Requested by: @Personed