Skip to content

e2e: exercise SSE4a bitfields through the console title - #434

Open
Prime1997 wants to merge 1 commit into
ivall:mainfrom
Prime1997:contrib/sse4a-guest-controls
Open

Prime1997 wants to merge 1 commit into
ivall:mainfrom
Prime1997:contrib/sse4a-guest-controls

Conversation

@Prime1997

Copy link
Copy Markdown
Contributor

Part of #216. The reported Intel crash occurred on an SSE4a INSERTQ. These two guest checks execute immediate and register-controlled INSERTQ and EXTRQ through the existing XCL exception handler.

What is in it

Tested

  • Windows 11 Pro build 26200, Intel Core i5-10400, GeForce RTX 3060 Ti (driver 32.0.16.1714), Rust 1.100.0.
  • Tested commit d4998b1bf396dbbaf9c678d417c61ee0c9636dff with cargo build --workspace --jobs 3 and cargo test --workspace --no-fail-fast --jobs 3 -- --test-threads=4 (debug). 676 passed, 0 failed, 41 ignored. 2 GPU tests reported a skip.
    • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
  • An earlier parallel suite run failed at the shared-page cubemap assertion and poisoned its test lock. We also reproduced that assertion on unmodified a6f5f7a in isolation on this GPU.
  • cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --nocapture passed. Both guest checks printed PASS on the Intel host.

Regression run

The test launches XCL's synthetic console title through its normal launcher. The changes are confined to the test title and end-to-end test.

Not tested

Native AMD SSE4a execution, other host CPUs, and retail gameplay. Optional sample-data tests ran without external sample files.

AI use

OpenAI Codex (GPT-6) helped write and adapt the tests, compare prior PRs, and run validation.

Run immediate and register forms through the title's exception path on Intel. Check the defined result, untouched registers and flags. Cover the fault reported in ivall#216 and complement the decoder-level tests.
@nullmarsh

Copy link
Copy Markdown

Native AMD SSE4a run, since Not tested lists it: head d4998b1 (already on main a6f5f7a) passes on a Zen 3 CPU, where INSERTQ / EXTRQ execute in hardware instead of through XCL's emulation. So the expected values in the 18 cases match what the silicon does.

Tested

  • AMD Ryzen 7 5800X3D (Zen 3, SSE4a native); AMD Radeon RX 9060 XT; Windows 11 Pro 26200; Rust 1.100.0 x86_64-pc-windows-msvc; debug build.
  • cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --nocapture: passes, with [PASS] CPU: SSE4a INSERTQ and EXTRQ preserve defined bits, sources and flags and [PASS] CPU: SSE4a register controls preserve bitfields, sources and flags.
  • .\scripts\test.ps1: passes, 0 failed; no SKIPPED GPU tests. cargo test -p xcl --lib sse4a: insn::tests::sse4a_bit_fields passes.

Not tested

  • Whether the native path was the one taken (I didn't instrument XCL's handler). On a CPU with SSE4a nothing should fault, so the emulation shouldn't run. Retail gameplay.

AI use

  • Claude Code (Claude Opus 5.5) ran the commands and wrote this report from the logs; I checked it before posting.

@AC-Storm-YT

Copy link
Copy Markdown

Test run on an AMD CPU with native SSE4a – commit d4998b1 (this PR's head, as is), clean tree

Tested

  • AMD Ryzen 7 9800X3D (Zen 5, SSE4a in hardware); AMD Radeon RX 9070 XT, driver 32.0.32029.2010; Windows 11 Pro build 26200; Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace: ok
  • cargo test --workspace -- --test-threads=4: 676 passed, 0 failed, 41 ignored. No SKIPPED tests.
  • test_title_runs_and_game_folder_is_untouched passes, so the test title printed both new markers ([PASS] CPU: SSE4a INSERTQ and EXTRQ preserve defined bits, sources and flags, [PASS] CPU: SSE4a register controls preserve bitfields, sources and flags)

On this CPU INSERTQ and EXTRQ run in hardware, so the run checks the 18 cases' expected results against real SSE4a rather than XCL's handler.

Not tested

Run and report: Claude Code (Claude Opus 5.5).

@alpz1000

Copy link
Copy Markdown

Independent end-to-end check on an Intel Core i5-8400 at PR head d4998b1bf396dbbaf9c678d417c61ee0c9636dff.

Tested with Windows 11 Home 26200.9974, RTX 3060 12 GB (driver 610.88), Rust 1.100.0 x86_64-pc-windows-msvc, debug. cargo build --locked --workspace succeeded. cargo test --locked -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --nocapture passed (1 passed, 0 failed, 0 ignored, 2 filtered out).

Both guest PASS markers appeared: immediate INSERTQ/EXTRQ and register-controlled SSE4a. XCL logged that it emulated INSERTQ and EXTRQ on this CPU.

Not tested: the full workspace suite, native AMD SSE4a, or retail gameplay for this PR.

AI use: OpenAI Codex (GPT-6) ran the local build and test and summarized the output.

@13hourstilliland

Copy link
Copy Markdown

Independent Intel CPU (i5-12600K, SSE4a emulated) e2e and full workspace run on exact PR head d4998b1.

Tested

  • Commit: d4998b1bf396dbbaf9c678d417c61ee0c9636dff (PR e2e: exercise SSE4a bitfields through the console title #434 head), clean worktree
  • Hardware: Intel Core i5-12600K (no native SSE4a); NVIDIA GeForce RTX 3070 8 GB, driver 610.88; 31.8 GB RAM; Windows 11 Home build 26200.9974
  • Toolchain: Rust 1.100.0 (stable-x86_64-pc-windows-gnu, not MSVC); DXC 1.9.2609.5 (01b62ad4) via XCL_DXC_DIR; debug build; no XCL_SAMPLE_* set
  • Targeted command: cargo test -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --nocapture (interactive desktop session)
    • Result: 1 passed, 0 failed, 0 ignored (11.39 s). Both new guest checks printed ([PASS] CPU: SSE4a INSERTQ and EXTRQ preserve defined bits, sources and flags and [PASS] CPU: SSE4a register controls preserve bitfields, sources and flags), and XCL logged that it emulated both Insertq and Extrq on this CPU.
  • Full workspace command: cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output (interactive desktop session)
    • Result: 676 passed, 0 failed, 41 ignored across 16 test binaries (xcl lib: 636 passed, 0 failed, 21 ignored; e2e: 3/0)
  • SKIPPED (4, not coverage):
    • no wave64 (2): gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware
    • no D3D12 debug layer (2): test_title_draws_with_a_root_signature_under_the_debug_layer, uploads_start_from_each_subresources_state

Not tested

  • Native AMD SSE4a hardware, MSVC toolchain, release build, retail gameplay / scripts/smoke.ps1, D3D12 debug-layer tests

AI use

  • Hermes Agent, gemini-4-neon: ran the commands and wrote this report from the logs; the human reviewed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants