D3D12.X: guard null and unreadable pointers in graphics and compute PSO hooks #2297

Open
github-bot wants to merge 1 commit from github-bot/gh-2297 into main AGit
Owner

@⁠GustavoEllwanger on GitHub · 2026-11-25 12:58 UTC · original
GustavoEllwanger:fix/d3d12x-pso-pointer-guards → main · +464 −45 · 3 files · 1 commits · open

Follow-up to #2015 for the graphics and compute PSO hooks (CreateGraphicsPipelineState / CreateComputePipelineState).

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs:
    • Adds a page-bounded C-string reader read_cstr_checked, shader/cached-PSO readability checks, validated input_layout_slice, and graphics_desc_has_unreadable_pointers / compute_desc_has_unreadable_pointers.
    • Rejects unreadable top-level desc, shader bytecode, CachedPSO, InputLayout (including overflowing NumElements and unreadable/unterminated SemanticName), and StreamOutput pointers in graphics_pso and dev_create_compute_pso with E_INVALIDARG instead of crashing inside D3D12Core or background copying.
    • Guards own_shader, own_compute, own_graphics, graphics_blob_key, and frame-trace layout logging against null SemanticName (CStr::from_ptr(null)), unreadable/overflowing InputLayout, and unreadable shader/desc pointers.
    • Guards *ppv dereferences in compute_container, translated_compute_pso_once (including the dispatch_chain and dred::label paths), and translated_graphics_pso_once with !ppv.is_null() && !(*ppv).is_null() (valid ppPipelineState == NULL probes return S_FALSE). The frame-trace block keeps its original indentation (if has_pso && trace_frame()), so the diff there only shows the input-layout change.
    • Adds unit tests in hle::d3d12x::real::pso_pointer_guard_tests.
  • crates/xcl/src/hle/d3d12x/device_x.rs: uses real::read_cstr_checked instead of raw CStr::from_ptr in note_base.
  • crates/xcl/tests/d3d12_pso_guards.rs: standalone integration tests (no game data, no vendor-specific skips) reproducing null SemanticName, unreadable/overflowing InputLayout, cross-page unterminated SemanticName, unreadable shader/CachedPSO/StreamOutput pointers, and unreadable top-level desc pointers via raw COM vtable calls.

The super::null::capture_*_desc calls stay before the new guard on purpose: they already check every pointer with gpu::shader::readable and count rejected pointers in the shader stats.

Tested

  • Hardware / toolchain: AMD Ryzen 7 7700, Windows 11, Rust 1.95.0 (59807616e 2026-04-14), DXC 1.8.2502.11, debug build.
    • GPU 1: NVIDIA GeForce RTX 5060 (driver 32.0.16.1088)
    • GPU 2: AMD Radeon(TM) Graphics (RDNA2 iGPU, driver 32.0.21042.62)
  • Rebased onto main 889ef3e, head 0b638b2 (the diff is unchanged).
  • Fail-first before the fix (cargo test -p xcl --test d3d12_pso_guards -- --test-threads=1 on RTX 5060): both graphics_and_compute_pso_unreadable_shader_and_desc_pointers_return_invalidarg and graphics_pso_null_semantic_name_does_not_crash crashed with 0xc0000005 (STATUS_ACCESS_VIOLATION).
  • On head 0b638b2, both GPUs:
    • cargo test -p xcl --lib hle::d3d12x::real::pso_pointer_guard_tests: 2 passed, 0 failed, 0 ignored.
    • cargo test -p xcl --test d3d12_pso_guards --test d3d12_mesh_stream -- --test-threads=1: d3d12_pso_guards 3 passed, d3d12_mesh_stream 3 passed (0 failed, 0 ignored).
    • cargo test --workspace --no-fail-fast -- --test-threads=4, with main 889ef3e run the same way for comparison:
      • RTX 5060: 1418 passed, 0 failed, 46 ignored, 29 SKIPPED lines (main: 1413 passed, 0 failed, 46 ignored).
      • RDNA2 iGPU: 1417 passed, 1 failed, 46 ignored, 18 SKIPPED lines (main: 1412 passed, 1 failed, 46 ignored). The failure is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 783), the same as on main, #2115.
      • The SKIPPED lines are wave64-only and per-lane gpu:: tests, plus heap_window_out_of_memory_falls_back_to_the_switch_form, shaders::tests::pso_measurement_compiles_an_exact_synthetic_record, the two the title under the debug layer runs and uploads_start_from_each_subresources_state (no debug layer or Developer Mode here), and on the iGPU passthrough_mesh_stream_accepts_a_triangle_driver_blob (no mesh shaders).
  • On the earlier head 5f084cc (same code except the frame-trace block indentation):
    • Independent verification by @⁠futurepro62 (comment): NVIDIA GeForce RTX 5070 Ti 1256 passed, 0 failed, 44 ignored; AMD Radeon RDNA2 iGPU 1267 passed, 0 failed, 46 ignored (all 5 new tests passed on both).
    • @⁠DavidM1911 on RTX 3060 Ti (comment): cargo test -p xcl --lib all passed.

Regression run

  • Pending: needs a paired scripts/smoke.ps1 run on main and on head 0b638b2.

Not tested

  • Retail title run (scripts/smoke.ps1) on head 0b638b2: I do not have a retail title package on this machine. @⁠Toons29 ran a clean 60 s RX 9070 pair on the older head 5f0547e (comment), which no longer counts after the rebases.
  • Non-Windows hosts and Intel GPUs.

AI use

  • Antigravity (Google Gemini): audited crates/xcl/src/hle/d3d12x/ for pointer/bounds safety bugs, implemented the guards in real.rs and device_x.rs, wrote the unit and integration tests, rebased onto afc5ee8, reproduced the pre-fix 0xc0000005 crashes, and ran the dual-GPU and workspace test suites on 5f084cc.
  • Claude Code (Claude Opus 5.5): reviewed the diff, moved the frame-trace block back to its original indentation, documented the read_cstr_checked limit, rebased onto 889ef3e, ran the tests on 0b638b2 on both GPUs and updated this description.
**@⁠GustavoEllwanger** on GitHub · 2026-11-25 12:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/2297) `GustavoEllwanger:fix/d3d12x-pso-pointer-guards` → `main` · +464 −45 · 3 files · 1 commits · open Follow-up to #2015 for the graphics and compute PSO hooks (`CreateGraphicsPipelineState` / `CreateComputePipelineState`). **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: - Adds a page-bounded C-string reader `read_cstr_checked`, shader/cached-PSO readability checks, validated `input_layout_slice`, and `graphics_desc_has_unreadable_pointers` / `compute_desc_has_unreadable_pointers`. - Rejects unreadable top-level desc, shader bytecode, `CachedPSO`, `InputLayout` (including overflowing `NumElements` and unreadable/unterminated `SemanticName`), and `StreamOutput` pointers in `graphics_pso` and `dev_create_compute_pso` with `E_INVALIDARG` instead of crashing inside `D3D12Core` or background copying. - Guards `own_shader`, `own_compute`, `own_graphics`, `graphics_blob_key`, and frame-trace layout logging against null `SemanticName` (`CStr::from_ptr(null)`), unreadable/overflowing `InputLayout`, and unreadable shader/desc pointers. - Guards `*ppv` dereferences in `compute_container`, `translated_compute_pso_once` (including the `dispatch_chain` and `dred::label` paths), and `translated_graphics_pso_once` with `!ppv.is_null() && !(*ppv).is_null()` (valid `ppPipelineState == NULL` probes return `S_FALSE`). The frame-trace block keeps its original indentation (`if has_pso && trace_frame()`), so the diff there only shows the input-layout change. - Adds unit tests in `hle::d3d12x::real::pso_pointer_guard_tests`. - `crates/xcl/src/hle/d3d12x/device_x.rs`: uses `real::read_cstr_checked` instead of raw `CStr::from_ptr` in `note_base`. - `crates/xcl/tests/d3d12_pso_guards.rs`: standalone integration tests (no game data, no vendor-specific skips) reproducing null `SemanticName`, unreadable/overflowing `InputLayout`, cross-page unterminated `SemanticName`, unreadable shader/`CachedPSO`/`StreamOutput` pointers, and unreadable top-level desc pointers via raw COM vtable calls. The `super::null::capture_*_desc` calls stay before the new guard on purpose: they already check every pointer with `gpu::shader::readable` and count rejected pointers in the shader stats. **Tested** - Hardware / toolchain: AMD Ryzen 7 7700, Windows 11, Rust `1.95.0 (59807616e 2026-04-14)`, DXC `1.8.2502.11`, debug build. - GPU 1: NVIDIA GeForce RTX 5060 (driver `32.0.16.1088`) - GPU 2: AMD Radeon(TM) Graphics (RDNA2 iGPU, driver `32.0.21042.62`) - Rebased onto `main` `889ef3e`, head `0b638b2` (the diff is unchanged). - Fail-first before the fix (`cargo test -p xcl --test d3d12_pso_guards -- --test-threads=1` on RTX 5060): both `graphics_and_compute_pso_unreadable_shader_and_desc_pointers_return_invalidarg` and `graphics_pso_null_semantic_name_does_not_crash` crashed with `0xc0000005` (`STATUS_ACCESS_VIOLATION`). - On head `0b638b2`, both GPUs: - `cargo test -p xcl --lib hle::d3d12x::real::pso_pointer_guard_tests`: **2 passed, 0 failed, 0 ignored**. - `cargo test -p xcl --test d3d12_pso_guards --test d3d12_mesh_stream -- --test-threads=1`: `d3d12_pso_guards` **3 passed**, `d3d12_mesh_stream` **3 passed** (0 failed, 0 ignored). - `cargo test --workspace --no-fail-fast -- --test-threads=4`, with `main` `889ef3e` run the same way for comparison: - RTX 5060: **1418 passed, 0 failed, 46 ignored**, 29 `SKIPPED` lines (`main`: 1413 passed, 0 failed, 46 ignored). - RDNA2 iGPU: **1417 passed, 1 failed, 46 ignored**, 18 `SKIPPED` lines (`main`: 1412 passed, 1 failed, 46 ignored). The failure is `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (seed 783), the same as on `main`, #2115. - The `SKIPPED` lines are wave64-only and per-lane `gpu::` tests, plus `heap_window_out_of_memory_falls_back_to_the_switch_form`, `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record`, the two `the title under the debug layer` runs and `uploads_start_from_each_subresources_state` (no debug layer or Developer Mode here), and on the iGPU `passthrough_mesh_stream_accepts_a_triangle_driver_blob` (no mesh shaders). - On the earlier head `5f084cc` (same code except the frame-trace block indentation): - Independent verification by @⁠futurepro62 ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2297)): NVIDIA GeForce RTX 5070 Ti **1256 passed, 0 failed, 44 ignored**; AMD Radeon RDNA2 iGPU **1267 passed, 0 failed, 46 ignored** (all 5 new tests passed on both). - @⁠DavidM1911 on RTX 3060 Ti ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2297)): `cargo test -p xcl --lib` all passed. **Regression run** - Pending: needs a paired `scripts/smoke.ps1` run on `main` and on head `0b638b2`. **Not tested** - Retail title run (`scripts/smoke.ps1`) on head `0b638b2`: I do not have a retail title package on this machine. @⁠Toons29 ran a clean 60 s RX 9070 pair on the older head `5f0547e` ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2297)), which no longer counts after the rebases. - Non-Windows hosts and Intel GPUs. **AI use** - Antigravity (Google Gemini): audited `crates/xcl/src/hle/d3d12x/` for pointer/bounds safety bugs, implemented the guards in `real.rs` and `device_x.rs`, wrote the unit and integration tests, rebased onto `afc5ee8`, reproduced the pre-fix `0xc0000005` crashes, and ran the dual-GPU and workspace test suites on `5f084cc`. - Claude Code (Claude Opus 5.5): reviewed the diff, moved the frame-trace block back to its original indentation, documented the `read_cstr_checked` limit, rebased onto `889ef3e`, ran the tests on `0b638b2` on both GPUs and updated this description.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:26:12 +00:00
Author
Owner

@⁠Toons29 on GitHub · 2026-11-25 13:36 UTC · original

Regression run of 5f0547e3 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 1a0bbe3a, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1628 (PresentX 1628)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14561 MB
xcl-smoke v1
commit: 5f0547e3c586ee44d330148ff83d5e9280ba53e7
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1630 (PresentX 1630)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14557 MB

Against the limits in CONTRIBUTING.md: 100 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.

**@⁠Toons29** on GitHub · 2026-11-25 13:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/2297#issuecomment-7164034205) Regression run of `5f0547e3` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `1a0bbe3a`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1628 (PresentX 1628) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14561 MB ``` ``` xcl-smoke v1 commit: 5f0547e3c586ee44d330148ff83d5e9280ba53e7 gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1630 (PresentX 1630) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14557 MB ``` Against the limits in CONTRIBUTING.md: 100 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; a script posted this right after the run, with both blocks exactly as printed.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-25 15:21 UTC · original · edited 2026-11-25 15:23 UTC

Full-suite run, since this PR has no test report yet. Tested exact head 5f084cc (on its base afc5ee8).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1256 passed, 0 failed, 44 ignored. SKIPPED (no wave64, no xgameruntime.dll): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_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, dispatch_chain_native_wave64_builds_whole, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, test_title_draws_with_a_root_signature_under_the_debug_layer, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: read_cstr_checked_handles_null_unreadable_valid_and_guard_page, own_graphics_and_own_compute_reject_null_and_unreadable_pointers, graphics_pso_null_semantic_name_does_not_crash, graphics_pso_unreadable_input_layout_and_semantic_name_return_invalidarg, graphics_and_compute_pso_unreadable_shader_and_desc_pointers_return_invalidarg.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1267 passed, 0 failed, 46 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 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))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 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))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), test_title_draws_with_a_root_signature_under_the_debug_layer (no xgameruntime.dll).
  • --skip leaves out tests that fail on main 568e7db too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-25 15:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/2297#issuecomment-7166717516) · edited 2026-11-25 15:23 UTC Full-suite run, since this PR has no test report yet. Tested exact head `5f084cc` (on its base `afc5ee8`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **1256 passed, 0 failed, 44 ignored**. SKIPPED (no wave64, no xgameruntime.dll): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_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`, `dispatch_chain_native_wave64_builds_whole`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `test_title_draws_with_a_root_signature_under_the_debug_layer`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `read_cstr_checked_handles_null_unreadable_valid_and_guard_page`, `own_graphics_and_own_compute_reject_null_and_unreadable_pointers`, `graphics_pso_null_semantic_name_does_not_crash`, `graphics_pso_unreadable_input_layout_and_semantic_name_return_invalidarg`, `graphics_and_compute_pso_unreadable_shader_and_desc_pointers_return_invalidarg`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **1267 passed, 0 failed, 46 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `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))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `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))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows), `test_title_draws_with_a_root_signature_under_the_debug_layer` (no xgameruntime.dll). - `--skip` leaves out tests that fail on main `568e7db` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/1651)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠GustavoEllwanger on GitHub · 2026-11-25 13:46 UTC · original · edited 2026-11-25 15:49 UTC

Thanks @⁠Toons29 for the earlier RX 9070 smoke run on 5f0547e! I had to rebase onto main (afc5ee8) to resolve the conflict in real.rs after #1592 / #2080 merged (preserving dred::label and dispatch_chain and guarding *ppv there as well). Re-verified on RTX 5060 + AMD RDNA2 + full workspace (1268 passed, 0 failed, 46 ignored). New head is 5f084cc — if anyone can rerun the paired smoke check on 5f084cc, it would be much appreciated!

**@⁠GustavoEllwanger** on GitHub · 2026-11-25 13:46 UTC · [original](https://github.com/xcl-dev/xcl/pull/2297#issuecomment-7164268089) · edited 2026-11-25 15:49 UTC Thanks @⁠Toons29 for the earlier RX 9070 smoke run on `5f0547e`! I had to rebase onto `main` (`afc5ee8`) to resolve the conflict in `real.rs` after #1592 / #2080 merged (preserving `dred::label` and `dispatch_chain` and guarding `*ppv` there as well). Re-verified on RTX 5060 + AMD RDNA2 + full workspace (**1268 passed, 0 failed, 46 ignored**). New head is `5f084cc` — if anyone can rerun the paired smoke check on `5f084cc`, it would be much appreciated!
Author
Owner

@⁠GustavoEllwanger on GitHub · 2026-11-25 15:50 UTC · original

Thanks @⁠futurepro62 for running the full RTX 5070 Ti + AMD RDNA2 iGPU verification on 5f084cc! Added your results to Tested in the PR description.

**@⁠GustavoEllwanger** on GitHub · 2026-11-25 15:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/2297#issuecomment-7167361946) Thanks @⁠futurepro62 for running the full RTX 5070 Ti + AMD RDNA2 iGPU verification on `5f084cc`! Added your results to **Tested** in the PR description.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 17:29 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 17:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/2297#issuecomment-7169589313) 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

@⁠GustavoEllwanger on GitHub · 2026-11-25 18:01 UTC · original

Thanks @⁠DavidM1911 for the RTX 3060 Ti run! The intermittent 0xc0000005 under parallel scheduling matches #1978, and the new tests here pass both in parallel and with --test-threads=1 on my side, so I don't think they add to it. If you ever catch which test aborts, I'm happy to look.

I pushed a small cleanup, squashed into the same commit. The new head is 56994d2:

  • the frame-trace block in translated_graphics_pso_once is back at its original indentation (if has_pso && trace_frame()), so the diff there only shows the input layout change;
  • read_cstr_checked now documents its 1024 byte limit.

No behaviour change from 5f084cc. On RTX 5060 the whole suite gives 1268 passed, 0 failed, 46 ignored, and the 5 new tests pass.

@⁠Toons29, since the head changed again, could you rerun the paired scripts/smoke.ps1 blocks on main afc5ee8 and on 56994d2 when you have time? That is the last thing the PR check is waiting for. Thanks a lot!

**@⁠GustavoEllwanger** on GitHub · 2026-11-25 18:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/2297#issuecomment-7170327059) Thanks @⁠DavidM1911 for the RTX 3060 Ti run! The intermittent `0xc0000005` under parallel scheduling matches #1978, and the new tests here pass both in parallel and with `--test-threads=1` on my side, so I don't think they add to it. If you ever catch which test aborts, I'm happy to look. I pushed a small cleanup, squashed into the same commit. The new head is `56994d2`: - the frame-trace block in `translated_graphics_pso_once` is back at its original indentation (`if has_pso && trace_frame()`), so the diff there only shows the input layout change; - `read_cstr_checked` now documents its 1024 byte limit. No behaviour change from `5f084cc`. On RTX 5060 the whole suite gives 1268 passed, 0 failed, 46 ignored, and the 5 new tests pass. @⁠Toons29, since the head changed again, could you rerun the paired `scripts/smoke.ps1` blocks on `main` `afc5ee8` and on `56994d2` when you have time? That is the last thing the PR check is waiting for. Thanks a lot!
Author
Owner

@⁠bmjask on GitHub · 2026-11-25 20:58 UTC · original · reviewed

P1: unreadable_bytecode/unreadable_cached_pso return false for pointer=NULL,length>0, so invalid descriptor pairs bypass validation. Console translation can then replace an invalid shader/CachedPSO with valid/default data: e.g. valid console CS/VS plus CachedPSO={NULL,64} can succeed rather than E_INVALIDARG; optional PS {NULL,nonzero} can be silently dropped. Require pointer/length consistency (p==0 iff n==0), reject mismatches, and add integration tests for null/nonzero CachedPSO and optional shader fields.

**@⁠bmjask** on GitHub · 2026-11-25 20:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/2297#pullrequestreview-6064895629) · **reviewed** P1: unreadable_bytecode/unreadable_cached_pso return false for pointer=NULL,length>0, so invalid descriptor pairs bypass validation. Console translation can then replace an invalid shader/CachedPSO with valid/default data: e.g. valid console CS/VS plus CachedPSO={NULL,64} can succeed rather than E_INVALIDARG; optional PS {NULL,nonzero} can be silently dropped. Require pointer/length consistency (p==0 iff n==0), reject mismatches, and add integration tests for null/nonzero CachedPSO and optional shader fields.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 08:15 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: 1 failure under parallel scheduling; clean on --test-threads=1 rerun (1312 passed, 0 failed, 27 ignored, 82s). Intermittent single-test flake — tracked in #1978.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 08:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/2297#issuecomment-7186377214) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: 1 failure under parallel scheduling; clean on `--test-threads=1` rerun (**1312 passed, 0 failed, 27 ignored**, 82s). Intermittent single-test flake — tracked in #1978. Thanks! — Devin
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2297/head:github-bot/gh-2297'
git switch 'github-bot/gh-2297'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2297'
git switch 'github-bot/gh-2297'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2297'
git switch 'github-bot/gh-2297'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2297'
git switch 'main'
git merge --squash 'github-bot/gh-2297'
git switch 'main'
git merge --ff-only 'github-bot/gh-2297'
git switch 'main'
git merge 'github-bot/gh-2297'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.