Repository navigation
Conversation
Preparation for buffers a title places outside the memory windows (xcl-dev#505), not called yet: `sparse::place_buffer_when(.., lazy)` makes the reserved resource without tiles and `sparse::use_range(va, len)` gives the lazily placed buffers there the window's video memory when a list is about to use an address of them. `place_buffer` is `place_buffer_when(.., false)` and behaves as before. The newer retail title places 128+ GPU-only buffers (~580 MB) at start; in a lab tree that gave them all video memory at once it ran out of RAM before the world, and lazily it had 108 / 526 MB in use 25 s into the world. `use_range` checks two atomics before it takes the sparse state's lock, so a call for an address outside every lazy buffer costs nothing. A lazy buffer released before its first use leaves the list in `forget_in`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A buffer the title places (CreatePlacedResourceX) outside every memory window became a committed resource of its own, and every view of it an empty V#: shaders read zeros and their writes were dropped. The newer retail title (xcl-dev#505) places all its compute buffers - light, ray and tile lists, BVH data, 128+ buffers, ~580 MB - in plain reservations above its GPU views, so its final gather had no tiles and wrote nothing, and its targets kept other targets' bytes. Such a buffer, at an address with no committed CPU pages (only the GPU uses it), now gets an address in the sparse windows, placed lazily (`sparse::place_buffer_when`): its views name that address, root CBV / SRV / UAV addresses into it are rewritten to it, and it gets video memory when a draw or dispatch names it (a root address or a buffer V# in the first 64 slots of a bound table), a copy or an ExecuteIndirect uses it. A range with committed pages is placed as before. Measured in a lab tree with the same logic (RTX 5080): "empty V#" warnings went from hundreds to 0, the final gather's tile list was filled, and 573 of 578 MB of these buffers were in use by 365 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t use The first four, then every power of two: where a buffer placed outside the windows lives in the sparse windows, and when a lazily placed buffer gets its video memory, with the MB placed and in use so far - what a run log needs to tell whether such buffers were reached. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2801 at Setup
Targeted RTX 4060 release unit tests (
|
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.
Stacked on #2799; only the top commit belongs here.
Two log lines, each for the first four occurrences and then at every power of two:
They are what a run log needs to show whether a title's GPU-only buffers were placed and reached. Part of #505.
What is in it
crates/xcl/src/hle/d3d12x/real.rs: the placement line inplace_outside_buffer.crates/xcl/src/hle/d3d12x/sparse.rs: bytes placed lazily and in use (LAZY_BYTES), and the first-use line inuse_range.Tested
cargo build -p xcl, no new warnings. Logging only, no test.stable-x86_64-pc-windows-msvc, release.cargo build --release --workspace && cargo test --release --workspace --no-fail-fast -- --test-threads=4onefcfdc3: 1437 passed, 4 failed, 47 ignored. The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(CreateComputePipelineState: out of memory (0x8007000E)), which fail onmainas well. SKIPPED (the same as onmain): 21 "no wave64", 3 refused by the per-lane form,heap_window_out_of_memory_falls_back_to_the_switch_form,pso_measurement_compiles_an_exact_synthetic_record.Regression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code