D3D12.X: populate companion SRVs for all image UAV dimensions and preserve null image view slots #1914

Manually merged
github merged 1 commit from gh-pr/1914/head into gh-pr/1914/base 2026-11-26 05:09:21 +00:00
Owner

@⁠certified-retart on GitHub · 2026-11-24 23:02 UTC · original
certified-retart:d3d12x/uav-companion-srv-and-null-image-views → main · +790 −34 · 1 files · 1 commits · merged 2026-11-25 10:55 UTC

Every console image descriptor slot in XCL pairs two adjacent PC descriptors: slot.index (SRV) and slot.index + 1 (UAV). Both the HLSL and Direct DXIL recompiler paths translate image_load, image_sample_*, and image_get_resinfo to ResourceDescriptorHeap[t[0]] (slot.index), while image_store and image_atomic_* index ResourceDescriptorHeap[t[0] + 1] (slot.index + 1).

Previously in crates/xcl/src/hle/d3d12x/real.rs:

  1. dev_create_uav_x only created the companion SRV at slot.pc_srv for dim == 4 (Texture2D). For Texture1D, Texture1DArray, Texture2DArray, and Texture3D UAVs, slot.pc_srv remained uninitialized (VA 0x0), and CopyDescriptorsSimple copied that uninitialized descriptor into destination/shared heaps, so reading any non-2D UAV via image_load or image_sample_* faulted the GPU at VA 0x0 (0x887A0006). Wildcard ArraySize == 0 | u32::MAX values on array UAVs were also not resolved, PlaneSlice was dropped, and Texture3D mip depth was not shifted by mip.
  2. dev_create_srv_x and dev_create_uav_x wrote [0; 8] into the console slot whenever pResource == NULL (explicit D3D12 null image views or failed resource_at() lookups), discarding slot.index so shaders indexed ResourceDescriptorHeap[0] / [1] (memory window 0/1 raw buffers or uninitialized descriptors) and preventing console_heap::copy_words from renumbering copied null views.

Part of #675 and #1269.

What is in it

  • Add resolve_uav_array_size, null_uav_desc, and uav_companion_srv in crates/xcl/src/hle/d3d12x/real.rs.
  • Populate and publish the companion SRV at slot.pc_srv in dev_create_uav_x for all image UAV dimensions (Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, including desc == NULL default UAVs), resolving ArraySize == 0 | u32::MAX, forwarding FirstArraySlice / PlaneSlice, handling D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE via a null SRV, matching the view dimension in null_uav_desc for no_uav, and shifting Texture3D depth by mip.
  • Preserve valid image T# descriptors (xcl_image_for_view(slot.index, ...)) for null image SRVs (dev_create_srv_x) and null image UAVs (dev_create_uav_x), normalizing DXGI_FORMAT_UNKNOWN to DXGI_FORMAT_R32_FLOAT and publishing a matching null companion SRV for null image UAVs.
  • Add unit tests (uav_companion_srv_covers_all_image_dimensions_and_wildcards) and an end-to-end SM 6.6 ResourceDescriptorHeap GPU test (gpu_uav_companion_srv_and_null_image_views) covering all 5 UAV dimensions, ArraySize = u32::MAX, Texture3D mip 1, null image SRV/UAV isolation from slot 0, and CopyDescriptorsSimple from a CPU-only staging heap to a shader-visible heap.

Tested

  • Hardware: NVIDIA GeForce RTX 5070 12 GB, Windows 11, DXC 1.9.2602.17, Agility SDK v614, debug & release builds.
  • cargo test --workspace -- --test-threads=4: 0 failed (all unit, GPU, and integration tests pass, including both new tests in hle::d3d12x::real::uav_companion_srv_tests).
  • Matched 60 s scripts/smoke.ps1 regression run (main vs PR head) below.

Regression run

main:

xcl-smoke v1
commit: 689f2db477c3c062cf162649781640ef8a977c18
gpu: NVIDIA GeForce RTX 5070
title: 6ca5cab7
seconds: 60
exit: 0x0
frames shown: 1676 (PresentX 1676)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15119 MB

PR:

xcl-smoke v1
commit: 47e9356c14a852a835b7c09b4bfa574945c80e95
gpu: NVIDIA GeForce RTX 5070
title: 6ca5cab7
seconds: 60
exit: 0x0
frames shown: 1681 (PresentX 1681)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15829 MB

Not tested

  • AMD / Intel GPUs and the D3D12 debug layer (not installed on this host).
  • Multi-plane (PlaneSlice > 0) UAV readback on hardware (unit-tested in uav_companion_srv_covers_all_image_dimensions_and_wildcards).

AI use

  • AI coding assistance was used to analyze the descriptor-slot translation paths, draft the implementation and tests, and verify locally with cargo test --workspace and scripts/smoke.ps1.
**@⁠certified-retart** on GitHub · 2026-11-24 23:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/1914) `certified-retart:d3d12x/uav-companion-srv-and-null-image-views` → `main` · +790 −34 · 1 files · 1 commits · merged 2026-11-25 10:55 UTC Every console image descriptor slot in XCL pairs two adjacent PC descriptors: `slot.index` (SRV) and `slot.index + 1` (UAV). Both the HLSL and Direct DXIL recompiler paths translate `image_load`, `image_sample_*`, and `image_get_resinfo` to `ResourceDescriptorHeap[t[0]]` (`slot.index`), while `image_store` and `image_atomic_*` index `ResourceDescriptorHeap[t[0] + 1]` (`slot.index + 1`). Previously in `crates/xcl/src/hle/d3d12x/real.rs`: 1. `dev_create_uav_x` only created the companion SRV at `slot.pc_srv` for `dim == 4` (`Texture2D`). For `Texture1D`, `Texture1DArray`, `Texture2DArray`, and `Texture3D` UAVs, `slot.pc_srv` remained uninitialized (VA `0x0`), and `CopyDescriptorsSimple` copied that uninitialized descriptor into destination/shared heaps, so reading any non-2D UAV via `image_load` or `image_sample_*` faulted the GPU at VA `0x0` (`0x887A0006`). Wildcard `ArraySize == 0 | u32::MAX` values on array UAVs were also not resolved, `PlaneSlice` was dropped, and `Texture3D` mip depth was not shifted by `mip`. 2. `dev_create_srv_x` and `dev_create_uav_x` wrote `[0; 8]` into the console slot whenever `pResource == NULL` (explicit D3D12 null image views or failed `resource_at()` lookups), discarding `slot.index` so shaders indexed `ResourceDescriptorHeap[0]` / `[1]` (memory window 0/1 raw buffers or uninitialized descriptors) and preventing `console_heap::copy_words` from renumbering copied null views. Part of #675 and #1269. **What is in it** - Add `resolve_uav_array_size`, `null_uav_desc`, and `uav_companion_srv` in `crates/xcl/src/hle/d3d12x/real.rs`. - Populate and publish the companion SRV at `slot.pc_srv` in `dev_create_uav_x` for all image UAV dimensions (`Texture1D`, `Texture1DArray`, `Texture2D`, `Texture2DArray`, `Texture3D`, including `desc == NULL` default UAVs), resolving `ArraySize == 0 | u32::MAX`, forwarding `FirstArraySlice` / `PlaneSlice`, handling `D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE` via a null SRV, matching the view dimension in `null_uav_desc` for `no_uav`, and shifting `Texture3D` depth by `mip`. - Preserve valid image T# descriptors (`xcl_image_for_view(slot.index, ...)`) for null image SRVs (`dev_create_srv_x`) and null image UAVs (`dev_create_uav_x`), normalizing `DXGI_FORMAT_UNKNOWN` to `DXGI_FORMAT_R32_FLOAT` and publishing a matching null companion SRV for null image UAVs. - Add unit tests (`uav_companion_srv_covers_all_image_dimensions_and_wildcards`) and an end-to-end SM 6.6 `ResourceDescriptorHeap` GPU test (`gpu_uav_companion_srv_and_null_image_views`) covering all 5 UAV dimensions, `ArraySize = u32::MAX`, `Texture3D` mip 1, null image SRV/UAV isolation from slot 0, and `CopyDescriptorsSimple` from a CPU-only staging heap to a shader-visible heap. **Tested** - Hardware: NVIDIA GeForce RTX 5070 12 GB, Windows 11, DXC 1.9.2602.17, Agility SDK v614, debug & release builds. - `cargo test --workspace -- --test-threads=4`: 0 failed (all unit, GPU, and integration tests pass, including both new tests in `hle::d3d12x::real::uav_companion_srv_tests`). - Matched 60 s `scripts/smoke.ps1` regression run (main vs PR head) below. **Regression run** main: ``` xcl-smoke v1 commit: 689f2db477c3c062cf162649781640ef8a977c18 gpu: NVIDIA GeForce RTX 5070 title: 6ca5cab7 seconds: 60 exit: 0x0 frames shown: 1676 (PresentX 1676) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15119 MB ``` PR: ``` xcl-smoke v1 commit: 47e9356c14a852a835b7c09b4bfa574945c80e95 gpu: NVIDIA GeForce RTX 5070 title: 6ca5cab7 seconds: 60 exit: 0x0 frames shown: 1681 (PresentX 1681) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15829 MB ``` **Not tested** - AMD / Intel GPUs and the D3D12 debug layer (not installed on this host). - Multi-plane (`PlaneSlice > 0`) UAV readback on hardware (unit-tested in `uav_companion_srv_covers_all_image_dimensions_and_wildcards`). **AI use** - AI coding assistance was used to analyze the descriptor-slot translation paths, draft the implementation and tests, and verify locally with `cargo test --workspace` and `scripts/smoke.ps1`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:09:20 +00:00
github manually merged commit 47e9356c14 into gh-pr/1914/base 2026-11-26 05:09:21 +00:00
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-24 23:08 UTC · original

Independent check of 47e9356 on an RTX 3080 Ti (621.35), Windows 11 build 26300 with Graphics Tools, Rust 1.99.1 MSVC debug, DXC 1.8.2502.11.

  • cargo test --offline --locked -p xcl --lib uav_companion_srv -- --nocapture --test-threads=1: 2 passed, zero skips, with the D3D12 debug layer enabled in the GPU fixture. All ten readback words matched. The same GPU test passed with GPU-based validation enabled.
  • I extended the same fixture with an 8×8 NV12 texture, using an R8G8_UINT view of PlaneSlice=1. The companion SRV read back U=71 and V=211 after the UAV store, both directly and through a CPU-only staging descriptor copied into the shader-visible heap. The same GPU test passed 1/1 with GPU-based validation, and all 14 readback words matched.

Each GPU run reported zero D3D12 errors and one warning (1328 for the fixture's buffer initial state). No device removal. The extensions were test-only and used synthetic inputs.

AI-assisted. Codex (GPT-6 family, exact variant unavailable) extended and ran the fixture and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-24 23:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/1914#issuecomment-7147054636) Independent check of [47e9356](https://github.com/xcl-dev/xcl/commit/47e9356c14a852a835b7c09b4bfa574945c80e95) on an RTX 3080 Ti (621.35), Windows 11 build 26300 with Graphics Tools, Rust 1.99.1 MSVC debug, DXC 1.8.2502.11. - `cargo test --offline --locked -p xcl --lib uav_companion_srv -- --nocapture --test-threads=1`: 2 passed, zero skips, with the D3D12 debug layer enabled in the GPU fixture. All ten readback words matched. The same GPU test passed with GPU-based validation enabled. - I extended the same fixture with an 8×8 NV12 texture, using an `R8G8_UINT` view of `PlaneSlice=1`. The companion SRV read back U=71 and V=211 after the UAV store, both directly and through a CPU-only staging descriptor copied into the shader-visible heap. The same GPU test passed 1/1 with GPU-based validation, and all 14 readback words matched. Each GPU run reported zero D3D12 errors and one warning (1328 for the fixture's buffer initial state). No device removal. The extensions were test-only and used synthetic inputs. AI-assisted. Codex (GPT-6 family, exact variant unavailable) extended and ran the fixture and drafted this report.
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 00:56 UTC · original

Code review on 47e9356:

  • uav_companion_srv, null_uav_desc, resolve_uav_array_size, and view_dim_to_image_type in crates/xcl/src/hle/d3d12x/real.rs cleanly populate companion SRVs across Texture1D, Texture1DArray, Texture2D, Texture2DArray, and Texture3D (handling ArraySize == 0 | u32::MAX, DENY_SHADER_RESOURCE, and null image views without aliasing slot 0), and gpu_uav_companion_srv_and_null_image_views exercises readback and CopyDescriptorsSimple renumbering on real SM 6.6 hardware.

What is still needed before merge:

  1. Follow up on @Melow-code's question regarding the +700 MB peak commit increase in the 60 s smoke comparison.
  2. Independent AMD verification (uav_companion_srv_tests + smoke), since current coverage is NVIDIA-only (RTX 5070 and RTX 3080 Ti).
**@⁠raylitebull** on GitHub · 2026-11-25 00:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/1914#issuecomment-7149052823) Code review on `47e9356`: - `uav_companion_srv`, `null_uav_desc`, `resolve_uav_array_size`, and `view_dim_to_image_type` in `crates/xcl/src/hle/d3d12x/real.rs` cleanly populate companion SRVs across `Texture1D`, `Texture1DArray`, `Texture2D`, `Texture2DArray`, and `Texture3D` (handling `ArraySize == 0 | u32::MAX`, `DENY_SHADER_RESOURCE`, and null image views without aliasing slot `0`), and `gpu_uav_companion_srv_and_null_image_views` exercises readback and `CopyDescriptorsSimple` renumbering on real SM 6.6 hardware. **What is still needed before merge:** 1. Follow up on `@Melow-code`'s question regarding the +700 MB peak commit increase in the 60 s smoke comparison. 2. Independent **AMD** verification (`uav_companion_srv_tests` + smoke), since current coverage is NVIDIA-only (`RTX 5070` and `RTX 3080 Ti`).
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 01:49 UTC · original

PR #1914 GPU verification

PR head 47e9356c14a852a835b7c09b4bfa574945c80e95 was fetched from origin via refs/pull/1914/head and tested in a clean detached checkout. Fetched origin/main was 3da2abb81606df622610e009f0430de99aa9881c. git merge-tree --write-tree origin/main HEAD exited 0 and produced tree 4cb1199246e366d7a39d1da67275d2f8a8c37cbc.

Tested

  • STOR-WINLAB, Windows 11 Enterprise Evaluation 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB on driver 32.0.101.9175 (wave range 8–32, DoublePrecisionFloatShaderOps=0). DXC and DXIL 1.9.2609.5. rustc 1.100.0 (0ef1bc386 2026-11-09). Unoptimized dev and test profiles with debug info and incremental compilation disabled.
  • cargo build --workspace and cargo test --workspace --no-run both exited 0 outside the GPU lock.
  • cargo test -p xcl --lib hle::d3d12x::real::uav_companion_srv_tests::uav_companion_srv_covers_all_image_dimensions_and_wildcards -- --exact --show-output returned 1 passed, 0 failed, 0 ignored, 0 skips.
  • cargo test -p xcl --lib hle::d3d12x::real::uav_companion_srv_tests::gpu_uav_companion_srv_and_null_image_views -- --exact --show-output returned 1 passed, 0 failed, 0 ignored under the Arc lock. Running the same test directly with XCL_TEST_UAV_COMPANION_CHILD=1, XCL_UMA_MB=64, and XCL_COHERENT_MB=64 exposed the child output and confirmed shader execution and readback, with 0 skips.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output ran once under L:/XclTooling/Invoke-ArcTest.ps1. Cargo exited 101. Across 19 test binaries and one doctest harness, libtest reported 952 passed, 25 failed, 45 ignored. The log contains 25 explicit skip messages including skipped subcases. Those subcases provide no coverage. Both PR tests passed in this run.

Failures

  • CreateComputePipelineState returned 0x80070057 in 20 tests:
    • gpu::dxil::fuzz_tests: fuzz_validate_and_gpu_0 (seed 2), fuzz_validate_and_gpu_1 (506), fuzz_validate_and_gpu_2 (1003), fuzz_validate_and_gpu_3 (1501).
    • gpu::dxil::ops_tests: doubles_match_cpu, groupshared_barrier_and_atomics_run.
    • gpu::dxil::round_tests: gpu_direct_f32_round_modes_dynamic_and_denormals, gpu_direct_f32_round_modes_static.
    • gpu::recomp::lower_dxil::tests: f64_programs_on_the_gpu.
    • gpu::recomp::tests: gpu_clamp_and_omod_per_instruction, gpu_f64_class_compare, gpu_f64_compares_with_nan, gpu_f64_literal_high_word, gpu_f64_math_random, gpu_f64_roots, gpu_f64_rounding_and_conversions, gpu_float_compares_random, gpu_frexp_f64_exp_and_mant, gpu_ldexp_f64, gpu_rndne_f64.
  • gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction failed the fused v_fma_f32 overflow control.
  • gpu::recomp::tests::gpu_ps_image_sample_offset_implicit_lod_between_mips read 25.609375 at pixel (0,0) where it expected 26.
  • gpu::recomp::tests::gpu_valu_16_and_64_bit failed the lane 0 v_add_f16 high-half preservation check.
  • gpu::recomp::tests::gpu_wave64_ps_whole_wave_reductions read [2, 217, 2] at pixel 0 where it expected [2, 216, 2].
  • e2e::test_title_runs_and_game_folder_is_untouched failed the RSSetDepthBiasX(-1000.5) check. The top-right pixel was blue and the test expected green.

Explicit skips

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::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::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 arithmetic, 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::integer_programs_on_the_gpu: integer carries, 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 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 placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2
SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll
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))

Not tested

  • Retail-title smoke runs on main and the PR head, failure reproduction on main, other GPU vendors, and release builds. Game sample checks that returned early, including XCL_SAMPLE_RPF, XCL_SAMPLE_TTPF, and XCL_SAMPLE_AWC, provided no game coverage.

AI use

  • T3 Code / Codex (gpt-6.2-sol) ran the build and tests and drafted this report. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified the counts against pr1914-suite.log and published this report.

Full suite log L:\XclTooling\sol-slot-10\tmp\pr1914-suite.log.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 01:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/1914#issuecomment-7149999147) # PR #1914 GPU verification PR head `47e9356c14a852a835b7c09b4bfa574945c80e95` was fetched from `origin` via `refs/pull/1914/head` and tested in a clean detached checkout. Fetched `origin/main` was `3da2abb81606df622610e009f0430de99aa9881c`. `git merge-tree --write-tree origin/main HEAD` exited 0 and produced tree `4cb1199246e366d7a39d1da67275d2f8a8c37cbc`. **Tested** - STOR-WINLAB, Windows 11 Enterprise Evaluation `26200.9974`, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB on driver `32.0.101.9175` (wave range 8–32, `DoublePrecisionFloatShaderOps=0`). DXC and DXIL `1.9.2609.5`. `rustc 1.100.0 (0ef1bc386 2026-11-09)`. Unoptimized dev and test profiles with debug info and incremental compilation disabled. - `cargo build --workspace` and `cargo test --workspace --no-run` both exited 0 outside the GPU lock. - `cargo test -p xcl --lib hle::d3d12x::real::uav_companion_srv_tests::uav_companion_srv_covers_all_image_dimensions_and_wildcards -- --exact --show-output` returned 1 passed, 0 failed, 0 ignored, 0 skips. - `cargo test -p xcl --lib hle::d3d12x::real::uav_companion_srv_tests::gpu_uav_companion_srv_and_null_image_views -- --exact --show-output` returned 1 passed, 0 failed, 0 ignored under the Arc lock. Running the same test directly with `XCL_TEST_UAV_COMPANION_CHILD=1`, `XCL_UMA_MB=64`, and `XCL_COHERENT_MB=64` exposed the child output and confirmed shader execution and readback, with 0 skips. - `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output` ran once under `L:/XclTooling/Invoke-ArcTest.ps1`. Cargo exited 101. Across 19 test binaries and one doctest harness, libtest reported **952 passed, 25 failed, 45 ignored**. The log contains **25 explicit skip messages** including skipped subcases. Those subcases provide no coverage. Both PR tests passed in this run. **Failures** - `CreateComputePipelineState` returned `0x80070057` in 20 tests: - `gpu::dxil::fuzz_tests`: `fuzz_validate_and_gpu_0` (seed 2), `fuzz_validate_and_gpu_1` (506), `fuzz_validate_and_gpu_2` (1003), `fuzz_validate_and_gpu_3` (1501). - `gpu::dxil::ops_tests`: `doubles_match_cpu`, `groupshared_barrier_and_atomics_run`. - `gpu::dxil::round_tests`: `gpu_direct_f32_round_modes_dynamic_and_denormals`, `gpu_direct_f32_round_modes_static`. - `gpu::recomp::lower_dxil::tests`: `f64_programs_on_the_gpu`. - `gpu::recomp::tests`: `gpu_clamp_and_omod_per_instruction`, `gpu_f64_class_compare`, `gpu_f64_compares_with_nan`, `gpu_f64_literal_high_word`, `gpu_f64_math_random`, `gpu_f64_roots`, `gpu_f64_rounding_and_conversions`, `gpu_float_compares_random`, `gpu_frexp_f64_exp_and_mant`, `gpu_ldexp_f64`, `gpu_rndne_f64`. - `gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction` failed the fused `v_fma_f32` overflow control. - `gpu::recomp::tests::gpu_ps_image_sample_offset_implicit_lod_between_mips` read `25.609375` at pixel `(0,0)` where it expected `26`. - `gpu::recomp::tests::gpu_valu_16_and_64_bit` failed the lane 0 `v_add_f16` high-half preservation check. - `gpu::recomp::tests::gpu_wave64_ps_whole_wave_reductions` read `[2, 217, 2]` at pixel 0 where it expected `[2, 216, 2]`. - `e2e::test_title_runs_and_game_folder_is_untouched` failed the `RSSetDepthBiasX(-1000.5)` check. The top-right pixel was blue and the test expected green. **Explicit skips** ```text 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::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::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 arithmetic, 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::integer_programs_on_the_gpu: integer carries, 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 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 placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2 SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll 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)) ``` **Not tested** - Retail-title smoke runs on `main` and the PR head, failure reproduction on `main`, other GPU vendors, and release builds. Game sample checks that returned early, including `XCL_SAMPLE_RPF`, `XCL_SAMPLE_TTPF`, and `XCL_SAMPLE_AWC`, provided no game coverage. **AI use** - T3 Code / Codex (`gpt-6.2-sol`) ran the build and tests and drafted this report. Coordinator #2 (T3 Code / Antigravity, `gemini-4-neon`) verified the counts against `pr1914-suite.log` and published this report. Full suite log `L:\XclTooling\sol-slot-10\tmp\pr1914-suite.log`.
Author
Owner

@⁠certified-retart on GitHub · 2026-11-25 01:53 UTC · original

Following up on @⁠Melow-code's question and @⁠raylitebull's review regarding the +707 MB peak commit delta in the initial 60 s smoke pair:

  1. Zero new allocations in the PR:
    • Every view slot in the shared shader-visible heap already pre-allocates its (slot.pc, slot.pc_srv) descriptor pair in \console_heap.rs\ regardless of whether a companion SRV is written; \uav_companion_srv\ only writes a descriptor into the existing \slot.pc_srv\ slot via \CreateShaderResourceView.

    • esolve_uav_array_size\ only computes the \u32\ \ArraySize\ field of a stack-local \D3D12_SHADER_RESOURCE_VIEW_DESC\ for an existing \ID3D12Resource\—it allocates no buffers, textures, or heaps.
  2. Paired alternating 60 s smoke reruns (exact base \689f2db\ vs exact PR head \47e9356, RTX 5070, \ itle: 6ca5cab7, \exit: 0x0, \device removals: 0, \crashes: 0, \60 60 60\ on every run):
Run \main\ (\689f2db) PR #1914 (\47e9356)
1 (PR body) 15,119 MB (1,676 frames) 15,826 MB (1,681 frames)
2 (alternating) 16,367 MB (1,679 frames) 15,346 MB (1,673 frames)
3 (alternating) 15,907 MB (1,685 frames) 15,728 MB (1,686 frames)
Median 15,907 MB 15,728 MB

So the initial +707 MB difference was normal run-to-run variance in background streaming / compilation during the 60 s window, not memory growth from this PR. (I don't have AMD hardware locally for the AMD verification item.)

**@⁠certified-retart** on GitHub · 2026-11-25 01:53 UTC · [original](https://github.com/xcl-dev/xcl/pull/1914#issuecomment-7150071396) Following up on @⁠Melow-code's question and @⁠raylitebull's review regarding the +707 MB peak commit delta in the initial 60 s smoke pair: 1. **Zero new allocations in the PR:** - Every view slot in the shared shader-visible heap already pre-allocates its (slot.pc, slot.pc_srv) descriptor pair in \console_heap.rs\ regardless of whether a companion SRV is written; \uav_companion_srv\ only writes a descriptor into the existing \slot.pc_srv\ slot via \CreateShaderResourceView\. - \ esolve_uav_array_size\ only computes the \u32\ \ArraySize\ field of a stack-local \D3D12_SHADER_RESOURCE_VIEW_DESC\ for an existing \ID3D12Resource\—it allocates no buffers, textures, or heaps. 2. **Paired alternating 60 s smoke reruns** (exact base \689f2db\ vs exact PR head \47e9356\, RTX 5070, \ itle: 6ca5cab7\, \exit: 0x0\, \device removals: 0\, \crashes: 0\, \60 60 60\ on every run): | Run | \main\ (\689f2db\) | PR #1914 (\47e9356\) | |---|---|---| | 1 (PR body) | 15,119 MB (1,676 frames) | 15,826 MB (1,681 frames) | | 2 (alternating) | 16,367 MB (1,679 frames) | 15,346 MB (1,673 frames) | | 3 (alternating) | 15,907 MB (1,685 frames) | 15,728 MB (1,686 frames) | | **Median** | **15,907 MB** | **15,728 MB** | So the initial +707 MB difference was normal run-to-run variance in background streaming / compilation during the 60 s window, not memory growth from this PR. (I don't have AMD hardware locally for the AMD verification item.)
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 02:04 UTC · original

Thanks @certified-retart for the alternating 60 s comparison runs (15,907 MB median on main vs 15,728 MB on 47e9356) confirming the earlier +707 MB difference was run-to-run background streaming variance with zero new heap allocations.

Only remaining item before merge: An independent AMD GPU verification pass on 47e9356.

**@⁠raylitebull** on GitHub · 2026-11-25 02:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/1914#issuecomment-7150280510) Thanks `@certified-retart` for the alternating 60 s comparison runs (`15,907 MB` median on `main` vs `15,728 MB` on `47e9356`) confirming the earlier +707 MB difference was run-to-run background streaming variance with zero new heap allocations. **Only remaining item before merge:** An independent **AMD** GPU verification pass on `47e9356`.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 02:24 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!

**@⁠DavidM1911** on GitHub · 2026-11-25 02:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/1914#issuecomment-7150688198) 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!
Author
Owner

@⁠SzczepanGrela on GitHub · 2026-11-25 04:41 UTC · original

Linux/RADV + Wine GPU test report on PR #1914 head 47e9356 (clean local merge 406a280 onto origin/main cbc296a, rustc 1.97.1, zero compiler warnings).

Tested

  • CachyOS Linux (kernel 7.3.0-5-cachyos), AMD Radeon RX 9070 (RADV GFX1201, device 0x7550, native wave64, Mesa 26.2.5-arch3.1, Vulkan 1.4.354), GE-Proton11-12 (wine-11.0 (Staging), vkd3d-proton v3.1-1-g8293130eb), DXC 1.9.2602.17 (21d28f72). Cross-built x86_64-pc-windows-gnu release (--lib in 39.50 s, 7 integration binaries in 26.20 s) with XCL_REQUIRE_GPU=wave64 XCL_NETWORK=0.
  • uav_companion_srv_covers_all_image_dimensions_and_wildcards --exact: 1 passed, 0 failed (0.00 s).
  • gpu_uav_companion_srv_and_null_image_views --exact (tested in 4 runs: parent-to-child default, direct child XCL_TEST_UAV_COMPANION_CHILD=1, parent-to-child XCL_DIRECT_DXIL=all, direct child XCL_DIRECT_DXIL=all): 0 passed, 1 failed (exit 101 in all 4 runs). In the observed sequence, ID3D12Device15 adoption ran before dev_create_uav_x, dev_create_srv_x, dev_copy_descriptors_simple_x, T# descriptor assertions, DXC cs_6_6 compilations, ID3D12CommandQueue adoption, and ID3D12CommandAllocator adoption, up to CreateCommandList, where CreateCommandList panicked with HRESULT(0x80070057) (Invalid parameter.) at crates/xcl/src/hle/d3d12x/real.rs:7846:134 (local merge 406a280; 7216:134 on PR #1914 head 47e9356) after Device and CommandAllocator adoption.
  • Side-by-side origin/main cbc296a runs show matching CreateCommandList HRESULT(0x80070057) failures after Device and CommandAllocator adoption in dma_list_release_cleans_up_list_state (fails in the hle::d3d12x::real suite at real.rs:6752:120 on cbc296a and real.rs:6979:120 on local merge 406a280, while passing solo in 0.07 s on cbc296a and 0.06 s on local merge 406a280), d3d12_resource_and_sync (fence_and_command_queue_sync_timing_and_allocator_reset_match_host_and_console at d3d12_resource_and_sync.rs:481:118), and predication_e2e (set_predication_buffer_state_and_kickoff at predication_e2e.rs:308:14).
  • hle::d3d12x::real --test-threads=1: 46 passed, 2 failed (1.15 s), vs origin/main cbc296a 45 passed, 1 failed (0.96 s); delta is uav_companion_srv_covers_all_image_dimensions_and_wildcards passing and gpu_uav_companion_srv_and_null_image_views failing at real.rs:7846:134 (local merge 406a280; 7216:134 on PR #1914 head 47e9356).
  • gpu::recomp::tests::gpu_ --test-threads=1 --skip gpu_sparse_vram_descriptors_buffers_and_xmem --skip gpu_uma_import_check_at_init --skip gpu_unified_memory_arena:
    • Default env: 99 passed, 1 failed, 1 ignored (3.99 s), vs origin/main cbc296a 99 passed, 1 failed, 1 ignored (4.50 s); identical failure gpu_nonfused_mad_and_mac_prevent_fma_contraction.
    • XCL_DIRECT_DXIL=all: 96 passed, 4 failed, 1 ignored (2.17 s), vs origin/main cbc296a 96 passed, 4 failed, 1 ignored (2.48 s); identical 4 failures (gpu_f64_math_random, gpu_f64_roots, gpu_image_get_resinfo_1d_array, gpu_nonfused_mad_and_mac_prevent_fma_contraction).
  • Integration binaries (local merge 406a280 identical pass/fail to origin/main cbc296a): console_dlls_e2e 13 passed, 0 failed (0.00 s vs 0.00 s); d3d12_resource_and_sync 2 passed, 1 failed (0.56 s vs 0.34 s); gpu_compute_e2e 2 passed, 2 failed (1.49 s vs 1.14 s); predication_e2e 0 passed, 1 failed (0.51 s vs 0.45 s); sparse_reinit 0 passed, 1 failed (0.62 s vs 0.41 s); gpu_pso_e2e 7 passed, 0 failed (0.29 s vs 0.28 s; 6 skipped with XCL_SAMPLE_RPF not set); texture_states 1 passed, 0 failed (0.00 s vs 0.00 s; skipped due to missing D3D12 debug layer 0x887A002D).

Not tested

  • GPU shader dispatch and readback in gpu_uav_companion_srv_and_null_image_views (crates/xcl/src/hle/d3d12x/real.rs:7849-7920 on local merge 406a280; 7219-7290 on PR #1914 head 47e9356) did not execute under Wine/vkd3d-proton v3.1 because CreateCommandList panicked at real.rs:7846:134 (local merge 406a280; 7216:134 on PR #1914 head 47e9356).
  • Retail title files and scripts/smoke.ps1 (no retail game files locally), plus the 6 XCL_SAMPLE_RPF-gated tests in gpu_pso_e2e and texture_states (0x887A002D).
  • gpu::recomp::tests::gpu_ skipped gpu_sparse_vram_descriptors_buffers_and_xmem, gpu_uma_import_check_at_init, and gpu_unified_memory_arena (pre-existing Wine in-process COM vtable swap).
  • --lib modules outside hle::d3d12x::real and gpu::recomp::tests::gpu_ (such as gpu::dxil), the remaining 10 integration test binaries in crates/xcl/tests/, and XCL_SPLIT_WAVE64=1 were not run.

AI use

  • Diff audit, test execution, and summary drafted with Antigravity (Gemini 4 Neon) multi-agent verification and verified by me before posting.
**@⁠SzczepanGrela** on GitHub · 2026-11-25 04:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/1914#issuecomment-7153077212) Linux/RADV + Wine GPU test report on PR `#1914` head `47e9356` (clean local merge `406a280` onto `origin/main` `cbc296a`, `rustc 1.97.1`, zero compiler warnings). **Tested** - CachyOS Linux (kernel `7.3.0-5-cachyos`), AMD Radeon RX 9070 (RADV GFX1201, device `0x7550`, native wave64, Mesa `26.2.5-arch3.1`, Vulkan `1.4.354`), `GE-Proton11-12` (`wine-11.0 (Staging)`, `vkd3d-proton v3.1-1-g8293130eb`), DXC `1.9.2602.17` (`21d28f72`). Cross-built `x86_64-pc-windows-gnu` release (`--lib` in 39.50 s, 7 integration binaries in 26.20 s) with `XCL_REQUIRE_GPU=wave64 XCL_NETWORK=0`. - `uav_companion_srv_covers_all_image_dimensions_and_wildcards --exact`: **1 passed, 0 failed** (0.00 s). - `gpu_uav_companion_srv_and_null_image_views --exact` (tested in 4 runs: parent-to-child default, direct child `XCL_TEST_UAV_COMPANION_CHILD=1`, parent-to-child `XCL_DIRECT_DXIL=all`, direct child `XCL_DIRECT_DXIL=all`): **0 passed, 1 failed** (exit 101 in all 4 runs). In the observed sequence, `ID3D12Device15` adoption ran before `dev_create_uav_x`, `dev_create_srv_x`, `dev_copy_descriptors_simple_x`, T# descriptor assertions, DXC `cs_6_6` compilations, `ID3D12CommandQueue` adoption, and `ID3D12CommandAllocator` adoption, up to `CreateCommandList`, where `CreateCommandList` panicked with `HRESULT(0x80070057)` (`Invalid parameter.`) at `crates/xcl/src/hle/d3d12x/real.rs:7846:134` (local merge `406a280`; `7216:134` on PR `#1914` head `47e9356`) after `Device` and `CommandAllocator` adoption. - Side-by-side `origin/main` `cbc296a` runs show matching `CreateCommandList` `HRESULT(0x80070057)` failures after `Device` and `CommandAllocator` adoption in `dma_list_release_cleans_up_list_state` (fails in the `hle::d3d12x::real` suite at `real.rs:6752:120` on `cbc296a` and `real.rs:6979:120` on local merge `406a280`, while passing solo in 0.07 s on `cbc296a` and 0.06 s on local merge `406a280`), `d3d12_resource_and_sync` (`fence_and_command_queue_sync_timing_and_allocator_reset_match_host_and_console` at `d3d12_resource_and_sync.rs:481:118`), and `predication_e2e` (`set_predication_buffer_state_and_kickoff` at `predication_e2e.rs:308:14`). - `hle::d3d12x::real --test-threads=1`: **46 passed, 2 failed** (1.15 s), vs `origin/main` `cbc296a` **45 passed, 1 failed** (0.96 s); delta is `uav_companion_srv_covers_all_image_dimensions_and_wildcards` passing and `gpu_uav_companion_srv_and_null_image_views` failing at `real.rs:7846:134` (local merge `406a280`; `7216:134` on PR `#1914` head `47e9356`). - `gpu::recomp::tests::gpu_ --test-threads=1 --skip gpu_sparse_vram_descriptors_buffers_and_xmem --skip gpu_uma_import_check_at_init --skip gpu_unified_memory_arena`: - Default env: **99 passed, 1 failed, 1 ignored** (3.99 s), vs `origin/main` `cbc296a` **99 passed, 1 failed, 1 ignored** (4.50 s); identical failure `gpu_nonfused_mad_and_mac_prevent_fma_contraction`. - `XCL_DIRECT_DXIL=all`: **96 passed, 4 failed, 1 ignored** (2.17 s), vs `origin/main` `cbc296a` **96 passed, 4 failed, 1 ignored** (2.48 s); identical 4 failures (`gpu_f64_math_random`, `gpu_f64_roots`, `gpu_image_get_resinfo_1d_array`, `gpu_nonfused_mad_and_mac_prevent_fma_contraction`). - Integration binaries (local merge `406a280` identical pass/fail to `origin/main` `cbc296a`): `console_dlls_e2e` **13 passed, 0 failed** (0.00 s vs 0.00 s); `d3d12_resource_and_sync` **2 passed, 1 failed** (0.56 s vs 0.34 s); `gpu_compute_e2e` **2 passed, 2 failed** (1.49 s vs 1.14 s); `predication_e2e` **0 passed, 1 failed** (0.51 s vs 0.45 s); `sparse_reinit` **0 passed, 1 failed** (0.62 s vs 0.41 s); `gpu_pso_e2e` **7 passed, 0 failed** (0.29 s vs 0.28 s; 6 skipped with `XCL_SAMPLE_RPF not set`); `texture_states` **1 passed, 0 failed** (0.00 s vs 0.00 s; skipped due to missing D3D12 debug layer `0x887A002D`). **Not tested** - GPU shader dispatch and readback in `gpu_uav_companion_srv_and_null_image_views` (`crates/xcl/src/hle/d3d12x/real.rs:7849-7920` on local merge `406a280`; `7219-7290` on PR `#1914` head `47e9356`) did not execute under Wine/`vkd3d-proton v3.1` because `CreateCommandList` panicked at `real.rs:7846:134` (local merge `406a280`; `7216:134` on PR `#1914` head `47e9356`). - Retail title files and `scripts/smoke.ps1` (no retail game files locally), plus the 6 `XCL_SAMPLE_RPF`-gated tests in `gpu_pso_e2e` and `texture_states` (`0x887A002D`). - `gpu::recomp::tests::gpu_` skipped `gpu_sparse_vram_descriptors_buffers_and_xmem`, `gpu_uma_import_check_at_init`, and `gpu_unified_memory_arena` (pre-existing Wine in-process COM vtable swap). - `--lib` modules outside `hle::d3d12x::real` and `gpu::recomp::tests::gpu_` (such as `gpu::dxil`), the remaining 10 integration test binaries in `crates/xcl/tests/`, and `XCL_SPLIT_WAVE64=1` were not run. **AI use** - Diff audit, test execution, and summary drafted with Antigravity (Gemini 4 Neon) multi-agent verification and verified by me before posting.
This discussion has been locked. Commenting is limited to contributors.
No description provided.