D3D12.X: size large BC texture addresses from the guest layout #935
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!935
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-935"
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?
@Gevroska on GitHub · 2026-11-24 08:43 UTC · original
Gevroska:xcl-local/committed-bc-texture-size→main· +126 −15 · 2 files · 1 commits · openA valid committed BC texture could receive a zero CPU address (#548).
What is in it
real.rs uses the guest XG layout for the fallback reservation. Adds a BC1 regression and updates README.md.
Tested
RTX 3080 616.92, Ryzen 7 5700X, Win11 26200.9457, Rust 1.100.0 MSVC. Debug scripts/test.ps1 --nocapture: 685 passed, 0 failed, 41 ignored. Four runtime skips: two native wave64 and two debug-layer cases. The BC1 test failed on main and passed here with a 512 MiB guest layout and 128 MiB PC allocation.
Regression run
Release, same title, 60 s, no input.
Not tested
AMD, Intel, Windows 10 or use of this fallback by the retail title.
AI use
Codex GPT-6.2 Sol high wrote and tested the patch. GPT-6.2 Sol xhigh prepared the comparisons and description; a separate Sol xhigh independently reviewed and GPU-tested it.
@ettehn on GitHub · 2026-11-24 08:53 UTC · original
The two BC1 fixtures on
96a56e0pass on my RTX 5070 Ti Laptop. There is one more sizing case worth covering: a supported tiled layout can need more space than the legacy estimate even when that estimate fits under the 1 GiB cap. The current early return then discards the XG size. This appears to be a remaining limitation of the original sizing path.A local change compared the padded guest requirement with the legacy reservation before discarding the original description. It kept the legacy reservation when sufficient and used the recorded layout when more space was needed, with the same cap at reservation time. All four
console_format_query_testspassed on Windows, including an additional narrow BC array checked withVirtualQuery. This verifies the reserved CPU range; retail loading and texture upload were outside the test.OpenAI Codex (GPT-6.2 Astra) assisted with verification.
@dcastell1 on GitHub · 2026-11-24 08:56 UTC · original
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean
main@beaa245(713 passed, 0 failed, 41 ignored on this box):One more passing test than main: sizing large BC texture addresses from the guest layout is covered and green.
Tree restored afterwards (md5 and a full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
@SlopTart on GitHub · 2026-11-24 10:37 UTC · original
Linux / AMD RDNA3 datapoint.
Merged state: head
96a56e0onto main9aec53d, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 718 passed, 7 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows. large-BC-texture address sizing green.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@Gevroska on GitHub · 2026-11-24 16:56 UTC · original
Thanks for testing this. The current fix covers the large-allocation fallback. Your example points to a separate early return that can discard a larger layout size below the cap. I’ll check that path with the narrow BC array before deciding whether to include it in this PR.
@thaqiart139-alt on GitHub · 2026-11-24 22:48 UTC · original
Test report for this PR's head
96a56e0, merged intomain689f2db(no conflicts), on AMD RDNA2 with native 64-lane waves and on a 32-lane NVIDIA card.Tested
XCL_ADAPTER.cargo test --workspace --no-fail-fast -- --test-threads=4:main689f2dbmain, from #1679's new fuzz tests, and both are already reported on #1679:fuzz_validate_and_gpu_0to_3(CreateComputePipelineState:0x8007000E)fuzz_validate_and_gpu_1(seed 540: res[833] = 0x7, CPU 0x6)gpu_console_committed_bc_addresses_cover_original_layout.SKIPPED tests (the same on
mainand with this PR)gpu::recomp::lower::tests:a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpugpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu, and the wave64 cases of itsf16/f32/f64/integer_programs_on_the_gpugpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardwarelower_dxil's f16 arithmetic, f16 packed and f32 conversions: refused ("its #1426 semantics differ from the console's")heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)pso_measurement_compiles_an_exact_synthetic_record(Windows Developer Mode is off)gpu::dxil::geometry_tests::gpu_geometry_direct_records,emitted_ms_primitive_attribute_reaches_the_pixel_shader,emitted_ms_ps_draw_a_triangle,gpu_geometry_mode_es_gs_strip,gpu_geometry_mode_es_gs_strip_with_branches,gpu_mesh_mode_two_passeslower_dxil's f16 arithmetic, f16 packed and f32 conversions: refused, as aboveheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)pso_measurement_compiles_an_exact_synthetic_record(Developer Mode is off)Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 09:17 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@xpatfussy69x on GitHub · 2026-11-25 11:24 UTC · original
Test report for head
96a56e0as pushed (not merged onto currentmain) – NVIDIA, wave32.Tested
.\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 685 passed, 0 failed, 41 ignoredgpu_console_committed_bc_addresses_cover_original_layoutran and passedXCL_SAMPLE_*data set (game-data tests not run)One stall, not reproduced. In an earlier full-suite run on this head, four
gpu::recomp::tests(gpu_typed_buffer_loads_and_stores,gpu_uma_import_check_at_init,gpu_valu_16_and_64_bit,gpu_wave32_and_wave64_src_vccz_execz) each ran for over 60 s and I stopped the run. I could not make it happen again:cargo test -p xcl --lib gpu::recomp::testspassed onmain568e7db(147 passed, 7 s) and on this head (114 passed, 5 s), and the full-suite run above passed. None of those tests touch this PR's code, so I read it as a one-off on my machine.Not tested
mainAI use
@S1m0ne1997 on GitHub · 2026-11-25 14:25 UTC · original
Test report for
96a56e0ba7127fdb89c47f60bf8f987ec1c9b553(this PR's head), for #1607.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09)x86_64-pc-windows-msvc, debug.cargo build --workspace, thencargo test --workspace -- --test-threads=4at the head: 685 passed, 0 failed, 41 ignored.gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64).Regression run (retail title,
scripts/smoke.ps1 -Seconds 60, release;mainbuilt from the commit in its block, this PR from its head, no uncommitted changes)main:
this PR:
A first smoke run of this same head crashed: exit
0xc0000005,crashes: 2, no device removal, presents per 2 s (last 3) 57 58 59, frames not logged because the run did not reach its end, peak commit 9 746 MB. That run's block is not pasted because it was made with this branch's oldersmoke.ps1, which prints the game folder's name instead of its hash (#677). The second run, above, andmain's run were clean, so this is 1 crash in 2 runs of this head and 0 in 1 ofmain: maybe intermittent, maybe unrelated to this PR. I did not look into the crash.Not tested
AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.
@Gevroska on GitHub · 2026-11-26 01:22 UTC · original
I reproduced the large BC1 texture reservation failure on Windows with an RTX 3080. I ran the same test on base
6d12f58aand local candidate7ceb0fbc. Both created the 16,384 × 16,384, four-layer BC1 resource and agreed on its 512 MiB layout. On the base, the CPU address reservation was zero and the test failed. On the candidate, the reservation was 512 MiB plus 64 KiB and the address stayed stable.I used Codex GPT-6.2 Sol for the first comparison. A separate GPT-6.2 Sol agent repeated both runs on the same adapter and reproduced the failure and pass, with zero skips. This covers the large-texture case. The separate below-cap case remains open.
I’ve carried the change onto
b49be183as local commitb82a8645. Validation of that revision is still in progress.I reviewed and approved this comment before posting.
@Gevroska on GitHub · 2026-11-26 08:45 UTC · original
I finished validating local candidate
b82a8645against baseb49be183on a GeForce RTX 3080. The base failed to reserve a CPU address for the 16,384 × 16,384, four-layer BC1 texture. The candidate returned a stable reservation of 512 MiB plus 64 KiB.The standard Windows suite reported 1,436 passed, 0 failed and 47 ignored. I counted 27 structured skip messages and two additional debug-layer skip messages. Both matched 60-second startup runs exited cleanly with zero crashes or device removals: 1,423 frames on the base and 1,457 on the candidate. These runs cover startup. The separate below-cap case and gameplay impact remain unverified.
I used Codex GPT-6 Sol Daybreak for the initial integration and GPT-6.2 Sol for the current-base change, regression test and validation. A separate GPT-6.2 Sol agent independently reviewed the result.
I reviewed and approved this comment before posting.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.