D3D12.X: fix RegisterPagePoolX 64-bit HANDLE write and CreateCommandQueueX (#48) desc layout #3260

Closed
Kalmarv wants to merge 1 commit from upstream-pr/3260 into main
Kalmarv commented 2026-11-29 02:08:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-29T02:08:33Z.


Fix two D3D12.X device API ABI bugs: write all 64 bits of the output HANDLE in RegisterPagePoolX (#74) and translate the Xbox-specific D3D12XBOX_COMMAND_QUEUE_DESC layout in CreateCommandQueueX (#48).

Previously:

  1. register_page_pool_x wrote only a 32-bit u32 through out: *mut u32, leaving the upper 32 bits of a caller's uninitialized 64-bit HANDLE untouched. Passing that handle back to UnregisterPagePoolX (#75) failed to match the registered pool.
  2. Device slot #48 (CreateCommandQueueX) reused create_command_queue_x (standard PC D3D12_COMMAND_QUEUE_DESC: { Type, Priority, Flags, NodeMask }). Because D3D12XBOX_COMMAND_QUEUE_DESC lays out { Type, Flags, EngineOrPipeIndex, QueueIndex }, Xbox queue flags were misread as PC Priority, odd EngineOrPipeIndex values falsely set D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT, and non-zero QueueIndex values leaked into PC NodeMask.

What is in it

  • crates/xcl/src/hle/d3d12x/device_x.rs:
    • Add pc_queue_desc_xbox and create_command_queue_xbox (sharing create_command_queue_inner with create_command_queue_x) to translate { Type, Flags, EngineOrPipeIndex, QueueIndex } into a PC D3D12_COMMAND_QUEUE_DESC: maps Flags[27:24] Xbox priority (3/5/7 -> high 100, others -> normal 0), Flags & 1 -> DISABLE_GPU_TIMEOUT, and NodeMask = 0.
    • Change register_page_pool_x (#74) to take out: *mut u64 and write the full 64-bit handle with out.write_unaligned(i as u64).
    • Update page_pools_register_once_and_unregister to pre-fill dirty upper 32 bits (0xDEAD_BEEF_FFFF_FFFF) and add child-process-isolated WARP test create_command_queue_xbox_desc_translates_fields_and_runs_on_warp.
  • crates/xcl/src/hle/d3d12x/real.rs:
    • Route device slot #48 (CreateCommandQueueX) to x::create_command_queue_xbox.
  • tests/testtitle/src/gpu.rs:
    • Update the RegisterPagePoolX test caller to pass a 64-bit HANDLE* (*mut u64) initialized with dirty upper bits.

Tested

  • Hardware / toolchain: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1074), AMD Ryzen 9 9950X, Windows 11 Pro (build 26200), rustc 1.99.0 (b940084d7 2026-09-28), DXC 1.9 (XCL_DXC_DIR), debug for tests and release for xcl-smoke.
  • Targeted tests (cargo test -p xcl --lib -- page_pools_register_once_and_unregister create_command_queue_xbox_desc_translates_fields_and_runs_on_warp console_types_and_descs_become_pc_ones --nocapture): 3 passed, 0 failed (0 skips; verified RegisterPagePoolX zeroes dirty upper 32 bits and UnregisterPagePoolX matches, and CreateCommandQueueX translates Flags/EngineOrPipeIndex/QueueIndex accurately on unit + WARP).
  • Full workspace (cargo test --workspace -j 2 -- --test-threads=4 --skip test_title_runs_and_game_folder_is_untouched --skip uma_driver::tests::): 2600 passed, 0 failed, 49 ignored (including e2e debug-layer xcl-testtitle tests).
  • SKIPPED GPU tests on this wave32 adapter (26 total across --nocapture workspace baseline): 21 no wave64 (RTX 5070 Ti is wave32), 3 wave32 per-lane #1426 f16/cvt-f16 refusals, 2 no heap windows (opt-in XCL_HEAP_WINDOWS=1).
  • Retail title (ea3b5e4d) 150 s regression run below (0 device removals, 0 crashes, 1673 frames vs 1695 on main, 32569 MB peak commit vs 31546 MB on main).

Regression run

xcl-smoke v1
commit: f0e8fdd5c3942ddd399d5ee11384c8595c5aacff
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 150
exit: 0x0
frames shown: 1695 (PresentX 1695)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 31546 MB
xcl-smoke v1
commit: 0d348b62e408cbf5b45a84b18fc73e16ca5cb88c
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 150
exit: 0x0
frames shown: 1673 (PresentX 1673)
presents per 2 s (last 3): 51 0 0
device removals: 0
crashes: 0
peak commit: 32569 MB

Not tested

  • AMD RDNA / wave64 GPUs and multi-node PC adapters (NodeMask canonicalization verified against WARP and unit assertions; ea3b5e4d smoke is a regression check).
  • uma_driver::tests:: (skipped locally due to pre-existing 0x7C10003 exit on NVIDIA) and test_title_runs_and_game_folder_is_untouched.

AI use

  • Antigravity (Gemini) used for root-cause verification, implementation, test authoring, and local verification; all diffs, tests, and smoke outputs reviewed and run locally.
<!-- greyfinch-sync:ivall/xcl:issue:5546688899 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3260). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-29T02:08:33Z. --- Fix two D3D12.X device API ABI bugs: write all 64 bits of the output `HANDLE` in `RegisterPagePoolX` (`#74`) and translate the Xbox-specific `D3D12XBOX_COMMAND_QUEUE_DESC` layout in `CreateCommandQueueX` (`#48`). Previously: 1. `register_page_pool_x` wrote only a 32-bit `u32` through `out: *mut u32`, leaving the upper 32 bits of a caller's uninitialized 64-bit `HANDLE` untouched. Passing that handle back to `UnregisterPagePoolX` (`#75`) failed to match the registered pool. 2. Device slot `#48` (`CreateCommandQueueX`) reused `create_command_queue_x` (standard PC `D3D12_COMMAND_QUEUE_DESC`: `{ Type, Priority, Flags, NodeMask }`). Because `D3D12XBOX_COMMAND_QUEUE_DESC` lays out `{ Type, Flags, EngineOrPipeIndex, QueueIndex }`, Xbox queue flags were misread as PC `Priority`, odd `EngineOrPipeIndex` values falsely set `D3D12_COMMAND_QUEUE_FLAG_DISABLE_GPU_TIMEOUT`, and non-zero `QueueIndex` values leaked into PC `NodeMask`. **What is in it** - `crates/xcl/src/hle/d3d12x/device_x.rs`: - Add `pc_queue_desc_xbox` and `create_command_queue_xbox` (sharing `create_command_queue_inner` with `create_command_queue_x`) to translate `{ Type, Flags, EngineOrPipeIndex, QueueIndex }` into a PC `D3D12_COMMAND_QUEUE_DESC`: maps `Flags[27:24]` Xbox priority (`3`/`5`/`7` -> high `100`, others -> normal `0`), `Flags & 1` -> `DISABLE_GPU_TIMEOUT`, and `NodeMask = 0`. - Change `register_page_pool_x` (`#74`) to take `out: *mut u64` and write the full 64-bit handle with `out.write_unaligned(i as u64)`. - Update `page_pools_register_once_and_unregister` to pre-fill dirty upper 32 bits (`0xDEAD_BEEF_FFFF_FFFF`) and add child-process-isolated WARP test `create_command_queue_xbox_desc_translates_fields_and_runs_on_warp`. - `crates/xcl/src/hle/d3d12x/real.rs`: - Route device slot `#48` (`CreateCommandQueueX`) to `x::create_command_queue_xbox`. - `tests/testtitle/src/gpu.rs`: - Update the `RegisterPagePoolX` test caller to pass a 64-bit `HANDLE*` (`*mut u64`) initialized with dirty upper bits. **Tested** - Hardware / toolchain: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1074), AMD Ryzen 9 9950X, Windows 11 Pro (build 26200), `rustc 1.99.0 (b940084d7 2026-09-28)`, DXC 1.9 (`XCL_DXC_DIR`), debug for tests and release for `xcl-smoke`. - Targeted tests (`cargo test -p xcl --lib -- page_pools_register_once_and_unregister create_command_queue_xbox_desc_translates_fields_and_runs_on_warp console_types_and_descs_become_pc_ones --nocapture`): 3 passed, 0 failed (0 skips; verified `RegisterPagePoolX` zeroes dirty upper 32 bits and `UnregisterPagePoolX` matches, and `CreateCommandQueueX` translates `Flags`/`EngineOrPipeIndex`/`QueueIndex` accurately on unit + WARP). - Full workspace (`cargo test --workspace -j 2 -- --test-threads=4 --skip test_title_runs_and_game_folder_is_untouched --skip uma_driver::tests::`): 2600 passed, 0 failed, 49 ignored (including `e2e` debug-layer `xcl-testtitle` tests). - `SKIPPED` GPU tests on this wave32 adapter (26 total across `--nocapture` workspace baseline): 21 `no wave64` (RTX 5070 Ti is wave32), 3 wave32 per-lane `#1426` f16/cvt-f16 refusals, 2 `no heap windows` (opt-in `XCL_HEAP_WINDOWS=1`). - Retail title (`ea3b5e4d`) 150 s regression run below (`0` device removals, `0` crashes, `1673` frames vs `1695` on `main`, `32569 MB` peak commit vs `31546 MB` on `main`). **Regression run** ``` xcl-smoke v1 commit: f0e8fdd5c3942ddd399d5ee11384c8595c5aacff gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 150 exit: 0x0 frames shown: 1695 (PresentX 1695) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 31546 MB ``` ``` xcl-smoke v1 commit: 0d348b62e408cbf5b45a84b18fc73e16ca5cb88c gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 150 exit: 0x0 frames shown: 1673 (PresentX 1673) presents per 2 s (last 3): 51 0 0 device removals: 0 crashes: 0 peak commit: 32569 MB ``` **Not tested** - AMD RDNA / wave64 GPUs and multi-node PC adapters (`NodeMask` canonicalization verified against WARP and unit assertions; `ea3b5e4d` smoke is a regression check). - `uma_driver::tests::` (skipped locally due to pre-existing `0x7C10003` exit on NVIDIA) and `test_title_runs_and_game_folder_is_untouched`. **AI use** - Antigravity (Gemini) used for root-cause verification, implementation, test authoring, and local verification; all diffs, tests, and smoke outputs reviewed and run locally.
Foniass commented 2026-12-01 06:29:48 +00:00 (Migrated from github.com)

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


merge-check
base: d0832e614f
head: 0d348b62e4
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2891 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (device_x.rs +104/-10, real.rs, tests/testtitle/src/gpu.rs). Every #48 call gets the new desc translation and every #74 call now writes 8 bytes instead of 4. Findings: (1) two unrelated fixes (RegisterPagePoolX and CreateCommandQueueX) in one PR. (2) Nothing shown supports the queue desc layout in pc_queue_desc_xbox (~79-94): the field names (EngineOrPipeIndex, QueueIndex) and the priority codes in Flags[27:24] (3/5/7/8/10/13) can't be read off a title's calls, so please say where they came from. The description overstates main's bug: main already reduces NodeMask to 0/1 (~76) and maps unknown priorities to HIGH, so the WARP test's NodeMask <= 1 check passes on main too; the only difference it shows is DISABLE_GPU_TIMEOUT set by an odd pipe index. (3) The 8-byte write in register_page_pool_x (~645, ~655) is right only if the argument is a HANDLE*; if it's a 4-byte index, the extra 4 bytes overwrite the caller's memory, where main wrote 4. A title log or call site showing the width would settle it. (4) AI use names no exact model; the PR's suite run skipped test_title_runs_and_game_folder_is_untouched and uma_driver::tests::. Fine: both slots share one inner function, so queue tracking is unchanged, the WARP test runs in a child process, and the page-pool test fills the upper bits with junk.
performance: 60 s smoke of a retail title, main d0832e61 vs this merge (b6811979): 1516 -> 1666 frames shown (109 %; last presents per 2 s: 60 61 60), peak commit 18133 -> 18260 MB, 0 device removals, 0 crashes.
verdict: not yet: nothing shows the RegisterPagePoolX argument is a HANDLE* (an 8-byte write where main wrote 4), the queue-desc layout has no stated source, and the two fixes should be split
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7302940329 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3260#issuecomment-7302940329). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:29:48Z. --- merge-check base: d0832e614fa7d6ae027bb4feb27ccb9121f54a8f head: 0d348b62e408cbf5b45a84b18fc73e16ca5cb88c merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2891 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: read the whole diff (device_x.rs +104/-10, real.rs, tests/testtitle/src/gpu.rs). Every #48 call gets the new desc translation and every #74 call now writes 8 bytes instead of 4. Findings: (1) two unrelated fixes (RegisterPagePoolX and CreateCommandQueueX) in one PR. (2) Nothing shown supports the queue desc layout in `pc_queue_desc_xbox` (~79-94): the field names (`EngineOrPipeIndex`, `QueueIndex`) and the priority codes in Flags[27:24] (3/5/7/8/10/13) can't be read off a title's calls, so please say where they came from. The description overstates main's bug: main already reduces NodeMask to 0/1 (~76) and maps unknown priorities to HIGH, so the WARP test's `NodeMask <= 1` check passes on main too; the only difference it shows is DISABLE_GPU_TIMEOUT set by an odd pipe index. (3) The 8-byte write in `register_page_pool_x` (~645, ~655) is right only if the argument is a `HANDLE*`; if it's a 4-byte index, the extra 4 bytes overwrite the caller's memory, where main wrote 4. A title log or call site showing the width would settle it. (4) AI use names no exact model; the PR's suite run skipped `test_title_runs_and_game_folder_is_untouched` and `uma_driver::tests::`. Fine: both slots share one inner function, so queue tracking is unchanged, the WARP test runs in a child process, and the page-pool test fills the upper bits with junk. performance: 60 s smoke of a retail title, main d0832e61 vs this merge (b6811979): 1516 -> 1666 frames shown (109 %; last presents per 2 s: 60 61 60), peak commit 18133 -> 18260 MB, 0 device removals, 0 crashes. verdict: not yet: nothing shows the RegisterPagePoolX argument is a HANDLE* (an 8-byte write where main wrote 4), the queue-desc layout has no stated source, and the two fixes should be split hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
thehollowedone commented 2026-12-01 08:02:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-12-01T08:02:11Z.


Independent test-reporting finding on the current PR head 0d348b62.

The WARP child test captures its stderr with Command::output(). When WARP is unavailable, skip_test writes a SKIPPED ... line and returns successfully; the parent checks the successful exit and returns without forwarding the captured stderr. The test can therefore pass without showing that the WARP portion was skipped.

A local synthetic Rust subprocess/libtest reproduction showed zero visible skip notices with the current capture-and-return pattern, and exactly one after forwarding only stderr lines beginning SKIPPED . This verifies the reporting behavior, not XCL's WARP path or GPU execution. Please add a deterministic child-process regression that confirms the parent surfaces the skip line while suppressing unrelated child diagnostics.

Candidate correction
@@
             assert!(
                 output.status.success(),
                 "child failed ({:?}):\nstdout:\n{}\nstderr:\n{}",
                 output.status,
                 String::from_utf8_lossy(&output.stdout),
                 String::from_utf8_lossy(&output.stderr)
             );
+            let mut stderr = std::io::stderr().lock();
+            for line in String::from_utf8_lossy(&output.stderr).lines() {
+                if line.starts_with("SKIPPED ") {
+                    let _ = std::io::Write::write_fmt(&mut stderr, format_args!("{line}\n"));
+                }
+            }
             return;

AI use: OpenAI Codex (GPT-6.2 Sol) checked the source and drafted this finding; a GPT-6.2 Sol subagent ran the synthetic reproduction.

<!-- greyfinch-sync:ivall/xcl:comment:7304790545 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3260#issuecomment-7304790545). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-12-01T08:02:11Z. --- Independent test-reporting finding on the current PR head [`0d348b62`](https://github.com/xcl-dev/xcl/commit/0d348b62e408cbf5b45a84b18fc73e16ca5cb88c). The WARP child test captures its stderr with `Command::output()`. When WARP is unavailable, `skip_test` writes a `SKIPPED ...` line and returns successfully; the parent checks the successful exit and returns without forwarding the captured stderr. The test can therefore pass without showing that the WARP portion was skipped. A local synthetic Rust subprocess/libtest reproduction showed zero visible skip notices with the current capture-and-return pattern, and exactly one after forwarding only stderr lines beginning `SKIPPED `. This verifies the reporting behavior, not XCL's WARP path or GPU execution. Please add a deterministic child-process regression that confirms the parent surfaces the skip line while suppressing unrelated child diagnostics. <details> <summary>Candidate correction</summary> ```diff @@ assert!( output.status.success(), "child failed ({:?}):\nstdout:\n{}\nstderr:\n{}", output.status, String::from_utf8_lossy(&output.stdout), String::from_utf8_lossy(&output.stderr) ); + let mut stderr = std::io::stderr().lock(); + for line in String::from_utf8_lossy(&output.stderr).lines() { + if line.starts_with("SKIPPED ") { + let _ = std::io::Write::write_fmt(&mut stderr, format_args!("{line}\n")); + } + } return; ``` </details> AI use: OpenAI Codex (GPT-6.2 Sol) checked the source and drafted this finding; a GPT-6.2 Sol subagent ran the synthetic reproduction.
bmjask commented 2026-12-01 20:01:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-01T20:01:51Z.

Code review location: crates/xcl/src/hle/d3d12x/device_x.rs; line 655

@@ -624,7 +652,7 @@ pub(super) unsafe extern "system" fn register_page_pool_x(_this: *mut c_void, va
         p.len() - 1
     });
     if !out.is_null() {
-        *out = i as u32;
+        out.write_unaligned(i as u64);

The handle is the Vec index, so the first pool registered in the process gets HANDLE 0 (NULL) with S_OK. Now that the title sees all 64 bits, if (!hPool) checks read that success as a failure, and a title using NULL to mean "no pool" never unregisters it. Offsetting by 1 would mean 0 is never a valid handle. The testtitle check pool != u32::MAX as u64 doesn't catch this.

<!-- greyfinch-sync:ivall/xcl:review-comment:4760168921 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3260#discussion_r4760168921). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-01T20:01:51Z. **Code review location:** `crates/xcl/src/hle/d3d12x/device_x.rs`; line 655 ~~~~diff @@ -624,7 +652,7 @@ pub(super) unsafe extern "system" fn register_page_pool_x(_this: *mut c_void, va p.len() - 1 }); if !out.is_null() { - *out = i as u32; + out.write_unaligned(i as u64); ~~~~ --- The handle is the Vec index, so the first pool registered in the process gets HANDLE 0 (NULL) with S_OK. Now that the title sees all 64 bits, `if (!hPool)` checks read that success as a failure, and a title using NULL to mean "no pool" never unregisters it. Offsetting by 1 would mean 0 is never a valid handle. The testtitle check `pool != u32::MAX as u64` doesn't catch this.
bmjask commented 2026-12-01 20:01:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-01T20:01:51Z.

Code review location: crates/xcl/src/hle/d3d12x/device_x.rs; line 84

@@ -76,9 +76,25 @@ pub fn pc_queue_desc(d: [u32; 4]) -> [u32; 4] {
     [pc_list_type(d[0]), priority, d[2] & 1, if d[3] == 0 { 0 } else { 1 }]
 }
 
-/// device #8 CreateCommandQueue / #48 CreateCommandQueueX(desc, riid, queue)
-pub(super) unsafe extern "system" fn create_command_queue_x(this: *mut c_void, desc: *const [u32; 4], riid: *const GUID, ppv: *mut *mut c_void) -> HRESULT {
-    let d = if desc.is_null() { [0; 4] } else { pc_queue_desc(desc.read_unaligned()) };
+/// D3D12XBOX_COMMAND_QUEUE_DESC { type, flags, engine/pipe index, queue index } (#48) → PC
+/// D3D12_COMMAND_QUEUE_DESC { type, priority, flags, node mask }.
+pub fn pc_queue_desc_xbox(d: [u32; 4]) -> [u32; 4] {
+    // Xbox encodes 4-bit hardware priority in Flags[27:24]: HIGH (3), HIGHER (5), HIGHEST (7)
+    // map to PC HIGH (100); MEDIUM (0), LOWEST (8), LOWER (10), LOW (13) map to PC NORMAL (0).
+    let priority = match (d[1] >> 24) & 0xF {

Priority nibble values outside the listed set (1, 2, 4, 6, 9, 11, 12, 14, 15) now map to NORMAL, and nothing is logged because bits 27:24 are inside the 0x0F00_0001 mask. The old #48 path sent unknown values to HIGH (100), so this silently lowers queue priority.

<!-- greyfinch-sync:ivall/xcl:review-comment:4760168933 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3260#discussion_r4760168933). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-01T20:01:51Z. **Code review location:** `crates/xcl/src/hle/d3d12x/device_x.rs`; line 84 ~~~~diff @@ -76,9 +76,25 @@ pub fn pc_queue_desc(d: [u32; 4]) -> [u32; 4] { [pc_list_type(d[0]), priority, d[2] & 1, if d[3] == 0 { 0 } else { 1 }] } -/// device #8 CreateCommandQueue / #48 CreateCommandQueueX(desc, riid, queue) -pub(super) unsafe extern "system" fn create_command_queue_x(this: *mut c_void, desc: *const [u32; 4], riid: *const GUID, ppv: *mut *mut c_void) -> HRESULT { - let d = if desc.is_null() { [0; 4] } else { pc_queue_desc(desc.read_unaligned()) }; +/// D3D12XBOX_COMMAND_QUEUE_DESC { type, flags, engine/pipe index, queue index } (#48) → PC +/// D3D12_COMMAND_QUEUE_DESC { type, priority, flags, node mask }. +pub fn pc_queue_desc_xbox(d: [u32; 4]) -> [u32; 4] { + // Xbox encodes 4-bit hardware priority in Flags[27:24]: HIGH (3), HIGHER (5), HIGHEST (7) + // map to PC HIGH (100); MEDIUM (0), LOWEST (8), LOWER (10), LOW (13) map to PC NORMAL (0). + let priority = match (d[1] >> 24) & 0xF { ~~~~ --- Priority nibble values outside the listed set (1, 2, 4, 6, 9, 11, 12, 14, 15) now map to NORMAL, and nothing is logged because bits 27:24 are inside the 0x0F00_0001 mask. The old #48 path sent unknown values to HIGH (100), so this silently lowers queue priority.
bmjask commented 2026-12-01 20:01:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-01T20:01:51Z.

Review: COMMENTED


Review of 0d348b62: 3 finding(s). 2 are inline. These are on lines outside the diff:

crates/xcl/src/hle/d3d12x/device_x.rs:650: Registering the same (va, pages) twice returns the same handle with no reference count, so the first UnregisterPagePoolX(H) removes the pool for both callers, and the second gets E_FAIL while the pool is still in use. The test asserts this behavior (i == j, then the second unregister fails).


These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6139051305 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3260#pullrequestreview-6139051305). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-01T20:01:51Z. **Review:** COMMENTED --- Review of `0d348b62`: 3 finding(s). 2 are inline. These are on lines outside the diff: **`crates/xcl/src/hle/d3d12x/device_x.rs:650`**: Registering the same (va, pages) twice returns the same handle with no reference count, so the first `UnregisterPagePoolX(H)` removes the pool for both callers, and the second gets E_FAIL while the pool is still in use. The test asserts this behavior (i == j, then the second unregister fails). --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
Kalmarv commented 2026-12-02 19:38:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-02T19:38:38Z.


Closing: bundles two unsourced ABI changes with review bugs (NULL handle 0 with S_OK, silent priority remapping).

<!-- greyfinch-sync:ivall/xcl:comment:7356496985 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3260#issuecomment-7356496985). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-12-02T19:38:38Z. --- Closing: bundles two unsourced ABI changes with review bugs (NULL handle 0 with `S_OK`, silent priority remapping).

Pull request closed

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!3260
No description provided.