GameInput: a device callback reports the statuses its filter names #1774

Open
b3IKK wants to merge 1 commit from upstream-pr/1784 into main
b3IKK commented 2026-11-24 20:37:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T20:37:15Z.


Addresses XCL-BT-027 from #1488.

IGameInput::RegisterDeviceCallback takes a statusFilter (a GameInputDeviceStatus mask) and ignored it (_filter): the callback always reported every status the gamepad has — connected, input enabled, output enabled, synchronized (0x47). A title that asked for one status (say OutputEnabled, to decide whether rumble works) was told about all of them, and a filter the device matches none of (a wired-only status on a wireless pad) still got a callback it should not see.

This reports STATUS & filter — the statuses the device has that the caller asked for — and calls nothing when the filter matches none of them.

What is in it

  • crates/xcl/src/hle/gameinput.rs: register_device_callback honours statusFilter on both the blocking and the async enumeration paths; add test a_device_callback_reports_only_the_statuses_it_asked_for (connected → 0x1, input+output → 0x6, a status the device does not have → no callback). Fails on main with left: 71, right: 1.

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1)
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 893 passed, 0 failed, 42 ignored (SKIPPED: 2 no wave64; 1 no heap windows; 1 cannot disable the driver cache (Windows Developer Mode is required))
  • cargo test -p xcl --lib gameinput: 10 passed, 0 failed

Regression run

main (e9e94ce, clean tree, no local changes):

xcl-smoke v1
commit: e9e94ce665d16bb0e2d2e4cb6b37e149f0d27721
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1646 (PresentX 1646)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14489 MB

PR (9b8c3de, clean tree, no local changes):

xcl-smoke v1
commit: 9b8c3de8851ad14e916bc3d8f9c214bf6ea5c854
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1644 (PresentX 1644)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14491 MB

Not tested

  • a title that registers for a status this emulation does not have and expects a later callback when it appears (the gamepad reports all four at once)
  • AMD GPUs and native wave64 hardware
  • other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine

AI use

  • OpenCode, Gemini 4 Neon: checked XCL-BT-027 against register_device_callback, wrote the fix and test (and confirmed it fails without it), rebased onto e9e94ce, ran the test suite and scripts/smoke.ps1 regression runs with #677's title hashing, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5479924164 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T20:37:15Z. --- Addresses `XCL-BT-027` from #1488. `IGameInput::RegisterDeviceCallback` takes a `statusFilter` (a `GameInputDeviceStatus` mask) and ignored it (`_filter`): the callback always reported every status the gamepad has — connected, input enabled, output enabled, synchronized (`0x47`). A title that asked for one status (say `OutputEnabled`, to decide whether rumble works) was told about all of them, and a filter the device matches none of (a wired-only status on a wireless pad) still got a callback it should not see. This reports `STATUS & filter` — the statuses the device has that the caller asked for — and calls nothing when the filter matches none of them. **What is in it** - `crates/xcl/src/hle/gameinput.rs`: `register_device_callback` honours `statusFilter` on both the blocking and the async enumeration paths; add test `a_device_callback_reports_only_the_statuses_it_asked_for` (connected → `0x1`, input+output → `0x6`, a status the device does not have → no callback). Fails on `main` with `left: 71, right: 1`. **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2609.5, debug (`scripts/test.ps1`) and release (`scripts/smoke.ps1`) - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): 893 passed, 0 failed, 42 ignored (SKIPPED: 2 `no wave64`; 1 `no heap windows`; 1 `cannot disable the driver cache (Windows Developer Mode is required))` - `cargo test -p xcl --lib gameinput`: 10 passed, 0 failed **Regression run** main (`e9e94ce`, clean tree, no local changes): ``` xcl-smoke v1 commit: e9e94ce665d16bb0e2d2e4cb6b37e149f0d27721 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1646 (PresentX 1646) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14489 MB ``` PR (`9b8c3de`, clean tree, no local changes): ``` xcl-smoke v1 commit: 9b8c3de8851ad14e916bc3d8f9c214bf6ea5c854 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1644 (PresentX 1644) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14491 MB ``` **Not tested** - a title that registers for a status this emulation does not have and expects a later callback when it appears (the gamepad reports all four at once) - AMD GPUs and native wave64 hardware - other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine **AI use** - OpenCode, Gemini 4 Neon: checked `XCL-BT-027` against `register_device_callback`, wrote the fix and test (and confirmed it fails without it), rebased onto `e9e94ce`, ran the test suite and `scripts/smoke.ps1` regression runs with #677's title hashing, and drafted this PR description.
b3IKK commented 2026-11-24 21:30:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T21:21:16Z.


Rebased onto e9e94ce (which brought #677's anonymised itle: line into scripts/smoke.ps1) and re-ran both: 893 passed, 0 failed, 42 ignored; the blocks above are from the new script.

<!-- greyfinch-sync:ivall/xcl:comment:7144817290 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7144817290). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T21:21:16Z. --- Rebased onto e9e94ce (which brought #677's anonymised itle: line into scripts/smoke.ps1) and re-ran both: 893 passed, 0 failed, 42 ignored; the blocks above are from the new script.
futurepro62 commented 2026-11-24 21:30:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:28:02Z.


Full-suite run, since this PR has no test report yet. Tested exact head 9b8c3de (on its base e9e94ce).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, 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 pso_measurement_compiles_an_exact_synthetic_record: 891 passed, 0 failed, 42 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: a_device_callback_reports_only_the_statuses_it_asked_for.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 893 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • Two tests were skipped with --skip on NVIDIA. Both fail on main 7f7e768 too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. heap_window_out_of_memory_falls_back_to_the_switch_form skips when XCL_HEAP_WINDOWS is unset (#1651), and shaders::tests::pso_measurement_compiles_an_exact_synthetic_record skipped because Developer Mode was off. Developer Mode was turned on before the AMD run, and there pso_measurement_compiles_an_exact_synthetic_record ran and passed.

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.
<!-- greyfinch-sync:ivall/xcl:comment:7144966882 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7144966882). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T21:28:02Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `9b8c3de` (on its base `e9e94ce`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, 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 pso_measurement_compiles_an_exact_synthetic_record`: **891 passed, 0 failed, 42 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `a_device_callback_reports_only_the_statuses_it_asked_for`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **893 passed, 0 failed, 42 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - Two tests were skipped with `--skip` on NVIDIA. Both fail on main `7f7e768` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns their skips into failures. `heap_window_out_of_memory_falls_back_to_the_switch_form` skips when `XCL_HEAP_WINDOWS` is unset (#1651), and `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` skipped because Developer Mode was off. Developer Mode was turned on before the AMD run, and there `pso_measurement_compiles_an_exact_synthetic_record` ran and passed. **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.
DavidM1911 commented 2026-11-25 00:08:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T23:36:04Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7147585297 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7147585297). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T23:36:04Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
JJAutoCompare commented 2026-11-25 04:10:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:26:18Z.


PR #1784 — GameInput compatibility verification

Tested clean checkout 9b8c3de8851ad14e916bc3d8f9c214bf6ea5c854. The change intersects the device status with the caller's filter in both enumeration paths and suppresses callbacks when the intersection is empty.

Environment

STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, DoublePrecisionFloatShaderOps=0, wave range 8–32). DXC/DXIL 1.9.2609.5. Rust 1.100.0 (0ef1bc386 2026-11-09), unoptimized dev/test profiles with debug info and incremental compilation disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run both succeeded.
  • cargo test -p xcl gameinput -- --nocapture returned 10 passed, 0 failed, 0 ignored. The new blocking-enumeration test verified connected-only (0x1), input and output enabled (0x6), and suppression for an unsupported wired-status filter (0x8). The existing asynchronous unregister test also passed with the full status filter.
  • One run of cargo test --workspace --no-fail-fast -- --test-threads=4 under the shared Arc lock, with RUST_TEST_NOCAPTURE=1 to retain skip diagnostics. Across 20 test summaries, libtest reported 875 passed, 18 failed, 42 ignored (exit 101). The log contains 7 explicit SKIPPED lines within the reported passes. Those paths provide zero coverage.

Failures and skips

  • 17 GPU library failures. 13 reported CreateComputePipelineState errors (0x80070057), including FP64 tests. The other four were assertions for FMA contraction, implicit-LOD mip sampling, FP16 high-half preservation, and wave64 pixel reductions.
  • One test-title integration failure. The dynamic-depth-bias check for RSSetDepthBiasX rendered the top-right pixel blue where it expected green.
  • Seven skips: two for unavailable wave64, two for the missing D3D12 debug layer, one for tiled resources tier below 2, one for unavailable heap windows, and one for the Developer Mode requirement when disabling the driver cache.

Not tested

A main baseline, retail-title smoke comparison, other adapters, game-data tests requiring unset XCL_SAMPLE_* variables, and asynchronous enumeration with a partial status filter.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1784-suite.log and published this report.

<!-- greyfinch-sync:ivall/xcl:comment:7151914100 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7151914100). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T03:26:18Z. --- # PR #1784 — GameInput compatibility verification Tested clean checkout `9b8c3de8851ad14e916bc3d8f9c214bf6ea5c854`. The change intersects the device status with the caller's filter in both enumeration paths and suppresses callbacks when the intersection is empty. **Environment** STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, `DoublePrecisionFloatShaderOps=0`, wave range 8–32). DXC/DXIL 1.9.2609.5. Rust 1.100.0 (0ef1bc386 2026-11-09), unoptimized dev/test profiles with debug info and incremental compilation disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` both succeeded. - `cargo test -p xcl gameinput -- --nocapture` returned 10 passed, 0 failed, 0 ignored. The new blocking-enumeration test verified connected-only (`0x1`), input and output enabled (`0x6`), and suppression for an unsupported wired-status filter (`0x8`). The existing asynchronous unregister test also passed with the full status filter. - One run of `cargo test --workspace --no-fail-fast -- --test-threads=4` under the shared Arc lock, with `RUST_TEST_NOCAPTURE=1` to retain skip diagnostics. Across 20 test summaries, libtest reported **875 passed, 18 failed, 42 ignored** (exit 101). The log contains **7 explicit `SKIPPED` lines** within the reported passes. Those paths provide zero coverage. **Failures and skips** - 17 GPU library failures. 13 reported `CreateComputePipelineState` errors (`0x80070057`), including FP64 tests. The other four were assertions for FMA contraction, implicit-LOD mip sampling, FP16 high-half preservation, and wave64 pixel reductions. - One test-title integration failure. The dynamic-depth-bias check for `RSSetDepthBiasX` rendered the top-right pixel blue where it expected green. - Seven skips: two for unavailable wave64, two for the missing D3D12 debug layer, one for tiled resources tier below 2, one for unavailable heap windows, and one for the Developer Mode requirement when disabling the driver cache. **Not tested** A `main` baseline, retail-title smoke comparison, other adapters, game-data tests requiring unset `XCL_SAMPLE_*` variables, and asynchronous enumeration with a partial status filter. **AI use** T3 Code / Codex (`gpt-6.2-sol`, `reasoningEffort: high`) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, `gemini-4-neon`) verified counts against `pr1784-suite.log` and published this report.
throny commented 2026-11-25 19:08:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-25T18:10:53Z.


Two contributors checked independently and found that #1603 solves the same problem (for #1488) in a different way: #1607, group D92. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7170551890 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7170551890). Originally posted by [throny](https://github.com/throny) on 2026-11-25T18:10:53Z. --- <!-- xcl-1607-hint:D92 --> Two contributors checked independently and found that #1603 solves the same problem (for #1488) in a different way: #1607, group D92. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
upstream-sync closed this pull request 2026-11-25 23:07:41 +00:00
CalvyPZ commented 2026-11-25 23:09:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CalvyPZ on 2026-11-25T22:42:33Z.


This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.

<!-- greyfinch-sync:ivall/xcl:comment:7176694005 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7176694005). Originally posted by [CalvyPZ](https://github.com/CalvyPZ) on 2026-11-25T22:42:33Z. --- This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.
upstream-sync reopened this pull request 2026-11-26 00:04:36 +00:00
throny commented 2026-11-28 16:26:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T16:26:42Z.


merge-check claim
head: 9b8c3de885

<!-- greyfinch-sync:ivall/xcl:comment:7242248039 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7242248039). Originally posted by [throny](https://github.com/throny) on 2026-11-28T16:26:42Z. --- merge-check claim head: 9b8c3de8851ad14e916bc3d8f9c214bf6ea5c854
throny commented 2026-11-28 16:48:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T16:48:38Z.


merge-check
base: db3921dc
head: 9b8c3de885
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2146 passed, 0 failed, 48 ignored (26 SKIPPED lines). Base alone at db3921dc: 2145 passed, 0 failed, 48 ignored.
review: it builds and passes, but two things are open. (1) It overlaps #1603, which is open for the same call, and the two differ in behaviour: this PR hands the callback the device's status masked by the filter, #1603 hands it the full status and uses the filter only to decide whether to call. With this PR a title that asks for "connected" only would be told that input is not enabled. I could not settle which is right: the public documentation today describes a newer version of the API without this parameter. (2) The triage note in the thread asking the two authors to agree on one PR has no reply.
performance: none.
verdict: not yet: decide between this and #1603 first (masked or full status in the callback); the code itself has no other finding.
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7242529969 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7242529969). Originally posted by [throny](https://github.com/throny) on 2026-11-28T16:48:38Z. --- merge-check base: db3921dc head: 9b8c3de8851ad14e916bc3d8f9c214bf6ea5c854 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2146 passed, 0 failed, 48 ignored (26 SKIPPED lines). Base alone at db3921dc: 2145 passed, 0 failed, 48 ignored. review: it builds and passes, but two things are open. (1) It overlaps #1603, which is open for the same call, and the two differ in behaviour: this PR hands the callback the device's status masked by the filter, #1603 hands it the full status and uses the filter only to decide whether to call. With this PR a title that asks for "connected" only would be told that input is not enabled. I could not settle which is right: the public documentation today describes a newer version of the API without this parameter. (2) The triage note in the thread asking the two authors to agree on one PR has no reply. performance: none. verdict: not yet: decide between this and #1603 first (masked or full status in the callback); the code itself has no other finding. hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
jsalzy commented 2026-11-30 00:50:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jsalzy on 2026-11-30T00:50:17Z.


merge-check claim
head: 9b8c3de885

<!-- greyfinch-sync:ivall/xcl:comment:7265619668 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7265619668). Originally posted by [jsalzy](https://github.com/jsalzy) on 2026-11-30T00:50:17Z. --- merge-check claim head: 9b8c3de8851ad14e916bc3d8f9c214bf6ea5c854
jsalzy commented 2026-11-30 01:05:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jsalzy on 2026-11-30T01:05:34Z.


merge-check
base: 53e85fb124
head: 9b8c3de885
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2793 passed, 1 failed, 49 ignored; SKIPPED: 28 (22 no wave64 on this GPU; 3 per-lane form refused: V_CVT_F16_F32, V_MUL_F16, V_PK_MUL_F16 (#1426 semantics); 2 no heap windows (opt-in XCL_HEAP_WINDOWS=1); 1 driver cache cannot be disabled without Windows Developer Mode); failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline (standin.rs:459, left (0, 1, 1), right (0, 0, 1)), fails on base too: main alone at 53e85fb gives 2792 passed, 1 failed (same test, same assertion), 49 ignored. The new test a_device_callback_reports_only_the_statuses_it_asked_for passes.
review: (1) The callback's currentStatus is masked by the filter (STATUS & filter). The GameInput docs for this API version (GameInputDeviceCallback, v0-v3 appendix) define currentStatus as "Current connection and input status of the device", and RegisterDeviceCallback's statusFilter as limiting which status changes trigger the callback, not what it reports. A title that registers for Connected (0x1) is told the pad is connected but not InputEnabled (0x2). #1603 (older, open, D92 in #1607) gates the same way but passes the full status, which matches the docs. This settles the question left open in the first check: the parameter is documented in the docs' appendix for v0-v3. (2) The new test locks in the masked status (0x1 -> 0x1, 0x2|0x4 -> 0x6); with the full status it would expect 0x47. (3) The test comment calls 0x8 "a wired connection"; in GameInputDeviceStatus 0x8 is RawIoEnabled (wired is the absence of Wireless, 0x80). (4) Whether statusFilter also gates the initial enumeration callbacks is not documented; both PRs gate it. (5) Only the blocking enumeration path is tested; the async path got the same change without a test. Scope is fine: one file, the callback and its test. Not run with a real title or controller.
performance: none: one mask and compare per RegisterDeviceCallback call.
verdict: not yet: pass the device's full status to the callback and keep the filter only for whether to call (as #1603 does), or take #1603 instead (D92 in #1607).
hardware / tool and model: RTX 4070 SUPER 12 GB (621.24 / 32.0.16.2124), Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 25H2 26200.9974, Rust 1.100.0, debug / Claude app (Claude Opus 5.5): merge, build and suite run on this PC with git and cargo only; diff review by Claude Opus 5.5.

<!-- greyfinch-sync:ivall/xcl:comment:7265834127 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7265834127). Originally posted by [jsalzy](https://github.com/jsalzy) on 2026-11-30T01:05:34Z. --- merge-check base: 53e85fb124eae624641e9884517e4f3c4a7d8794 head: 9b8c3de8851ad14e916bc3d8f9c214bf6ea5c854 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2793 passed, 1 failed, 49 ignored; SKIPPED: 28 (22 no wave64 on this GPU; 3 per-lane form refused: V_CVT_F16_F32, V_MUL_F16, V_PK_MUL_F16 (#1426 semantics); 2 no heap windows (opt-in XCL_HEAP_WINDOWS=1); 1 driver cache cannot be disabled without Windows Developer Mode); failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline (standin.rs:459, left (0, 1, 1), right (0, 0, 1)), fails on base too: main alone at 53e85fb gives 2792 passed, 1 failed (same test, same assertion), 49 ignored. The new test a_device_callback_reports_only_the_statuses_it_asked_for passes. review: (1) The callback's currentStatus is masked by the filter (STATUS & filter). The GameInput docs for this API version (GameInputDeviceCallback, v0-v3 appendix) define currentStatus as "Current connection and input status of the device", and RegisterDeviceCallback's statusFilter as limiting which status changes trigger the callback, not what it reports. A title that registers for Connected (0x1) is told the pad is connected but not InputEnabled (0x2). #1603 (older, open, D92 in #1607) gates the same way but passes the full status, which matches the docs. This settles the question left open in the first check: the parameter is documented in the docs' appendix for v0-v3. (2) The new test locks in the masked status (0x1 -> 0x1, 0x2|0x4 -> 0x6); with the full status it would expect 0x47. (3) The test comment calls 0x8 "a wired connection"; in GameInputDeviceStatus 0x8 is RawIoEnabled (wired is the absence of Wireless, 0x80). (4) Whether statusFilter also gates the initial enumeration callbacks is not documented; both PRs gate it. (5) Only the blocking enumeration path is tested; the async path got the same change without a test. Scope is fine: one file, the callback and its test. Not run with a real title or controller. performance: none: one mask and compare per RegisterDeviceCallback call. verdict: not yet: pass the device's full status to the callback and keep the filter only for whether to call (as #1603 does), or take #1603 instead (D92 in #1607). hardware / tool and model: RTX 4070 SUPER 12 GB (621.24 / 32.0.16.2124), Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 25H2 26200.9974, Rust 1.100.0, debug / Claude app (Claude Opus 5.5): merge, build and suite run on this PC with git and cargo only; diff review by Claude Opus 5.5.
johnbf8x commented 2026-11-30 01:15:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by johnbf8x on 2026-11-30T01:15:07Z.


merge-check
base: 53e85fb124
head: 9b8c3de885
merge: clean (git merge --no-commit --no-ff onto origin/main in a detached worktree; main has changed crates/xcl/src/hle/gameinput.rs by +409/-76 since the PR's base e9e94ce6, the merge was automatic; the merged tree was tested uncommitted)
build: cargo build --workspace -> ok (the PR merged and main alike, each in its own target dir)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> main and PR the same: 137 passed, 2 failed, 20 ignored outside the lib; the lib binary ends abnormally on both, so no lib total. SKIPPED: 28 on both (22 no wave64, 3 f16/f32 per-lane forms refused, 2 no heap windows, 1 no D3D12 debug layer). Failing: e2e test_title_draws_with_a_root_signature_under_the_debug_layer and test_title_runs_under_the_debug_layer_with_dred (no D3D12 debug layer on this PC), both fail on main too. The lib in parts: hle::d3d12x::list_x alone on 1 thread 113 passed, 0 failed on both; the rest on 4 threads ends the process on both before its summary (PR: 1731 ok, 1 FAILED, then 0x80004005; a second run of the same PR binary: 1732 ok, 0 failed, then 0x80004005; main: 1458 ok, 0 failed, then 0xc0000409). The one failure, hle::d3d12x::alloc_pool::tests::a_reset_that_puts_the_allocator_aside_keeps_what_the_gpu_still_reads, is in code this PR does not touch and passed 5 of 5 runs alone on the PR and 5 of 5 on main, so I count it as flaky, not the PR's. cargo test -p xcl --lib hle::gameinput:: -- --test-threads=1 -> PR 13 passed, main 12 passed, 0 failed on both; the PR's new a_device_callback_reports_only_the_statuses_it_asked_for passes
review: after reading the whole diff (one file, gameinput.rs). It does what the description says: the callback runs only when STATUS & filter is not 0 and gets that masked status, on the blocking and the asynchronous path. (1) The masked status is the problem jsalzy's check names, and I agree: Microsoft's GameInput versioning notes describe the pre-v4 statusFilter as choosing which status changes fire the callback, with currentStatus / previousStatus being the device's status, not a filtered view of it, so a title that registers for Connected (0x1) would be told the pad is not input-enabled. #1603 (D92 on #1607) gates the same way and passes the full status. (2) The new test locks in the masked values (0x1 -> 0x1, 0x2|0x4 -> 0x6). (3) The test covers the blocking enumeration only; the asynchronous path's change is untested. (4) A filter of 0 now gets no callback, where before it got one with every status. Not run with a real title or controller
performance: none expected by default: one AND and one compare per RegisterDeviceCallback call, nothing per frame (reasoned, not measured)
verdict: not yet: pass the device's full status to the callback and use the filter only to decide whether to call it (as #1603 does); the merge, build and suite are otherwise clean here
hardware / tool and model: NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.40), Intel Core i7-12700K, Windows 10 Pro 19045, rustc 1.100.0 / Claude Code, Claude Opus 5.5

<!-- greyfinch-sync:ivall/xcl:comment:7265976009 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7265976009). Originally posted by [johnbf8x](https://github.com/johnbf8x) on 2026-11-30T01:15:07Z. --- merge-check base: 53e85fb124eae624641e9884517e4f3c4a7d8794 head: 9b8c3de8851ad14e916bc3d8f9c214bf6ea5c854 merge: clean (git merge --no-commit --no-ff onto origin/main in a detached worktree; main has changed crates/xcl/src/hle/gameinput.rs by +409/-76 since the PR's base e9e94ce6, the merge was automatic; the merged tree was tested uncommitted) build: cargo build --workspace -> ok (the PR merged and main alike, each in its own target dir) tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> main and PR the same: 137 passed, 2 failed, 20 ignored outside the lib; the lib binary ends abnormally on both, so no lib total. SKIPPED: 28 on both (22 no wave64, 3 f16/f32 per-lane forms refused, 2 no heap windows, 1 no D3D12 debug layer). Failing: e2e test_title_draws_with_a_root_signature_under_the_debug_layer and test_title_runs_under_the_debug_layer_with_dred (no D3D12 debug layer on this PC), both fail on main too. The lib in parts: hle::d3d12x::list_x alone on 1 thread 113 passed, 0 failed on both; the rest on 4 threads ends the process on both before its summary (PR: 1731 ok, 1 FAILED, then 0x80004005; a second run of the same PR binary: 1732 ok, 0 failed, then 0x80004005; main: 1458 ok, 0 failed, then 0xc0000409). The one failure, hle::d3d12x::alloc_pool::tests::a_reset_that_puts_the_allocator_aside_keeps_what_the_gpu_still_reads, is in code this PR does not touch and passed 5 of 5 runs alone on the PR and 5 of 5 on main, so I count it as flaky, not the PR's. cargo test -p xcl --lib hle::gameinput:: -- --test-threads=1 -> PR 13 passed, main 12 passed, 0 failed on both; the PR's new a_device_callback_reports_only_the_statuses_it_asked_for passes review: after reading the whole diff (one file, gameinput.rs). It does what the description says: the callback runs only when STATUS & filter is not 0 and gets that masked status, on the blocking and the asynchronous path. (1) The masked status is the problem jsalzy's check names, and I agree: Microsoft's GameInput versioning notes describe the pre-v4 statusFilter as choosing which status changes fire the callback, with currentStatus / previousStatus being the device's status, not a filtered view of it, so a title that registers for Connected (0x1) would be told the pad is not input-enabled. #1603 (D92 on #1607) gates the same way and passes the full status. (2) The new test locks in the masked values (0x1 -> 0x1, 0x2|0x4 -> 0x6). (3) The test covers the blocking enumeration only; the asynchronous path's change is untested. (4) A filter of 0 now gets no callback, where before it got one with every status. Not run with a real title or controller performance: none expected by default: one AND and one compare per RegisterDeviceCallback call, nothing per frame (reasoned, not measured) verdict: not yet: pass the device's full status to the callback and use the filter only to decide whether to call it (as #1603 does); the merge, build and suite are otherwise clean here hardware / tool and model: NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.40), Intel Core i7-12700K, Windows 10 Pro 19045, rustc 1.100.0 / Claude Code, Claude Opus 5.5
Foniass commented 2026-12-01 06:46:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:46:46Z.


Triage (#1607) – head 9b8c3de

#1603 makes the same gating change in register_device_callback (gameinput.rs): no callback when the status filter names none of the gamepad's statuses.
This PR also passes STATUS & filter as currentStatus. GameInput documents currentStatus as the device's status; the filter only selects which changes call back. A title that registers with GameInputDeviceInputEnabled (0x2) alone would get a status without GameInputDeviceConnected and can treat the gamepad as disconnected. The new test pins that (filter 0x1 -> status 0x1, filter 0x6 -> 0x6). Its comment also calls 0x8 a wired connection, but 0x8 is GameInputDeviceRawIoEnabled.
Recommendation: close (bad: currentStatus is masked by the filter; #1603 gates without masking).

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7303261575 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1784#issuecomment-7303261575). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:46:46Z. --- **Triage (#1607)** – head 9b8c3de #1603 makes the same gating change in `register_device_callback` (`gameinput.rs`): no callback when the status filter names none of the gamepad's statuses. This PR also passes `STATUS & filter` as `currentStatus`. GameInput documents `currentStatus` as the device's status; the filter only selects which changes call back. A title that registers with `GameInputDeviceInputEnabled` (0x2) alone would get a status without `GameInputDeviceConnected` and can treat the gamepad as disconnected. The new test pins that (filter 0x1 -> status 0x1, filter 0x6 -> 0x6). Its comment also calls 0x8 a wired connection, but 0x8 is `GameInputDeviceRawIoEnabled`. Recommendation: close (bad: currentStatus is masked by the filter; #1603 gates without masking). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1784:upstream-pr/1784'
git switch 'upstream-pr/1784'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1784'
git switch 'upstream-pr/1784'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1784'
git switch 'upstream-pr/1784'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1784'
git switch 'main'
git merge --squash 'upstream-pr/1784'
git switch 'main'
git merge --ff-only 'upstream-pr/1784'
git switch 'main'
git merge 'upstream-pr/1784'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1774
No description provided.