Repository navigation
Conversation
|
The two BC1 fixtures on 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 OpenAI Codex (GPT-6.2 Astra) assisted with verification. |
|
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 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. |
|
Linux / AMD RDNA3 datapoint. Merged state: head Full suite, Not tested: retail titles (none here), Windows, RDNA4. 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 AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting. |
|
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. |
|
Test report for this PR's head Tested
SKIPPED tests (the same on
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Test report for head Tested
One stall, not reproduced. In an earlier full-suite run on this head, four Not tested
AI use
|
|
Test report for Tested
Regression run (retail title, main: this PR: A first smoke run of this same head crashed: exit 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. |
|
I reproduced the large BC1 texture reservation failure on Windows with an RTX 3080. I ran the same test on base 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 I reviewed and approved this comment before posting. |
|
I finished validating local candidate 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. |
96a56e0 to
b82a864
Compare
|
Independent desktop NVIDIA verification of PR #935 at head Environment
Targeted release tests & build (
|
| Command | Result |
|---|---|
cargo test --release -p xcl gpu_console_committed_wide_bc_addresses_cover_original_layout -- --nocapture (3 consecutive runs) |
1 passed; 0 failed; 0 ignored; 1336 filtered out × 3 (0.21s, 0.20s, 0.21s); live output on all 3 runs: NVIDIA GeForce RTX 4060: created 16384x16384x4 BC1, XG 0x20000000, D3D12 0x20000000, CPU reserve 0x20010000 |
cargo test --release -p xcl hle::d3d12x::real:: -- --test-threads=1 (3 consecutive runs) |
61 passed; 0 failed; 0 ignored; 1276 filtered out × 3 (2.10s, 2.08s, 2.08s, 0 skipped) |
cargo build --release -p xcl |
Clean build (exit 0, 0 new warnings) |
Live test output confirms that on desktop NVIDIA GeForce RTX 4060 (8 GB), the committed 16384x16384x4 BC1_UNORM texture (format 71) retains its 0x20000000-byte XG console layout size and receives the padded 0x20010000-byte CPU fallback reservation (GetGPUVirtualAddress of a committed 16384x16384 texture (format 71, flags 0x0): 0x20010000 bytes ...).
Paired quiet 60 s retail smoke (title: 29640639)
Exact parent & merge-base (b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, cached baseline on the same machine):
xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1518 (PresentX 1518)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14018 MB
PR #935 (b82a8645b5bb827c0a65abd98b19149c7f7c5425):
xcl-smoke v1
commit: b82a8645b5bb827c0a65abd98b19149c7f7c5425
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1586 (PresentX 1586)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14016 MB
Runtime log observations (xcl.log)
9223log lines,0[ERROR]/ device-removal / panic lines.- Final draw/memory telemetry in log:
19510 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14016 MB committed by the process; video memory 6115 MB local, 4682 MB non-local. 0committed textureGetGPUVirtualAddressfallback reservations logged during the 60 s retail run ontitle: 29640639.
Limits of coverage
- The new committed wide
BC1fallback sizing path (COMMITTED_BC_LAYOUT_SIZEprivate data ->0x20010000CPU reserve covering the0x20000000console layout) was directly exercised on the RTX 4060 viagpu_console_committed_wide_bc_addresses_cover_original_layout(3/3pass) andhle::d3d12x::real::(61/61× 3). title: 29640639did not hit the committed wide BC fallback path in 60 s, so the retail smoke confirms zero runtime regression on this title (frame-count delta vs. cached parent smoke reflects single-run startup variance, not this PR).
AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
|
Tested: Clean Not tested: Texture sampling, separate below-cap sizing, full workspace suite and retail smoke. AI use: T3 Code / Codex ( |
e40aecb to
d4cebf1
Compare
Keep the supported committed BC layout size when the legacy reservation rejects the texture. Cover the native wide BC1 fallback with the fixture that failed before and passed after on the RTX 3080. Assisted-by: Codex (GPT-6 Sol Daybreak and GPT-6.2 Sol) (cherry picked from commit b82a864) (cherry picked from commit d4cebf1)
d4cebf1 to
421d52b
Compare
|
I reproduced the separate below-cap sizing case on head
Both resources were created through the console committed-resource hook. I checked that neither had a placed title address, that repeated queries returned the same fallback address, and that VirtualQuery reported the reservation. The four-layer resource's legal 8-byte block is wholly outside that reservation. The fixture compared offsets and bounds without touching an unreserved address. I set XCL_UMA_MB=64 and XCL_COHERENT_MB=64 to exercise the committed fallback under the existing 128 MiB coherent-headroom policy. With the normal larger coherent window the small resource went through placement instead. The supported guest layout is available for both inputs, but remember_committed_bc_layout_size returns early whenever the legacy estimate fits the cap. Considering the guest extent for that case as well would cover the missing slice. This measures CPU address coverage; the fallback does not upload CPU writes to the native texture. AI use: OpenAI Codex adapted the stock wide-BC test, ran the native controls, and drafted this report. |
|
@andrewDoing, thanks for testing the published head ( I scoped #935 to the wide-texture case where the legacy estimate exceeds the cap. Your example shows that an estimate can fit under the cap and still leave a valid guest offset outside the reservation. I’d keep the 8×8, four-mip, one-layer versus four-layer comparison as a regression test for a separate below-cap fix. Comparing the offset and reservation size also lets that test demonstrate the bug without touching unreserved memory. GPT-6.2 Astra drafted this reply from your RTX 5070 measurements and the scope of #935. I reviewed and approved this comment before posting. |
|
For the separate below-cap fix, here is the bounds assertion from the 8×8 BC1 control in a form that can be added alongside the wide-texture regression. Use the same four-mip, 0x109 guest descriptor for both cases, with array length 1 or 4. Set XCL_UMA_MB=64 and XCL_COHERENT_MB=64 in the test process before creating the device. After console committed creation, require title_address to be absent, query the fallback address twice and check equality, then get the reservation's RegionSize via VirtualQuery at that base. let layout = crate::hle::xg::Texture::new(&desc).unwrap();
let block = layout.element_offset(3, 0, 0, usize::from(layers) - 1);
let end = block.checked_add(8).unwrap(); // one BC1 block, exclusive end
assert_eq!((layout.size(), block), match layers {
1 => (0x10000, 0x1000),
4 => (0x40000, 0x31000),
_ => unreachable!(),
});
assert!(end <= reservation_bytes, "layers={layers}: {end:#x} > {reservation_bytes:#x}");On 421d52b the one-layer control passes and the four-layer case fails with 0x31008 > 0x20000. This assertion allows larger valid reservations and never forms or dereferences a pointer to the last block. The original native measurements are in the comparison above. AI-assisted regression note. |
|
No open or merged PR makes the same change. main's Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
The committed-texture address fallback can reject a large BC texture whose guest layout fits within the reservation limit. Preserve that layout size when the native resource is created so the fallback can reserve enough CPU address space.
What is in it
real.rsuses the supported guest layout when the legacy size estimate rejects a committed BC texture. The wide BC1 regression checks the reservation size and address reuse.Tested
scripts/test.ps1 --nocapturewith four test threads. Stock passed 2,594 tests, and the XG Split wave32 geometry: refuse prefix counts over a mask #44 texture readback and split-worker cache artifact test passed in both revisions. The split-worker test includes the upstream artifact assertions from Tests: verify worker whole-form cache artifacts #3213. The earlier XG Split wave32 geometry: refuse prefix counts over a mask #44 mismatch did not reproduce in the matched current suites.Libtest totals 2595 passed, 0 failed, 49 ignored, 0 filtered out
28 explicit runtime skip messages
SKIPPED gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole: no wave64
SKIPPED gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu: const_mask, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 arithmetic, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 compares, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu: mask_ff0_flbit, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer arithmetic, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu: f64, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer carries, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 rounding, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 transcendentals, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 three-source, wave64: no wave64
SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
SKIPPED hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap: no heap windows (opt-in: XCL_HEAP_WINDOWS=1)
SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)
SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows
SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))
Regression run
Matched 150-second startup smokes used the same title and adapter, separate fresh DXIL caches and on-demand shader preparation (
XCL_PREPARE=0). No menu input was sent.Not tested
AI use
I reviewed and approved this PR update and its description before publication.