d3d12_xs: drop console-only command queue flags, keep DISABLE_GPU_TIMEOUT #338
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/338"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from omonkeyz/xbox-emulator. Originally posted by GDAgent on 2026-11-23T20:30:38Z.
Library / area:
d3d12_xs(xone_queue.rs)Exports changed (exports.txt rows): none
Source of the behaviour: call sites of a very popular AAA title (Xbox Series X build), native Windows 11 on an RDNA2 GPU; not run under Proton.
What
xone_queue::translaterewrites the XboxD3D12XBOX_COMMAND_QUEUE_DESCinto the PC one before the realCreateCommandQueue. It mapped type, priority and node mask but forwarded the flags unchanged. It now keeps bit 0 (the PCDISABLE_GPU_TIMEOUT) and clears the rest, and the "translated" log line also shows the PC flags.Why / evidence
The title creates compute queues (type 2) with console flags 0x2 and 0x3. Before this change they were forwarded unchanged and the PC runtime refused them with
E_INVALIDARG, because the only PC queue flag isDISABLE_GPU_TIMEOUT(bit 0). Masking to bit 0 is exact for the PC side, and flag 3 keeps its timeout bit.With this change the same calls in a run on native Windows 11 (RDNA2):
An earlier version of this change also made
CreateCommandListXfall back for unknown IIDs. That is left out: #296 maps the one IID the title asks for, and a generic fallback would hide a wrong IID instead of reporting it.Tests
xone_queue::tests::console_only_queue_flags_are_dropped_and_the_pc_flag_kept: flags 0, 1, 2, 3 and0x8000_0002map to 0, 1, 0, 1 and 0 with type, priority and node unchanged.xone_queue::tests::dma_type_priority_and_node_still_map_to_pc_values: DMA type becomes COPY, unknown priority becomes HIGH, node 4 becomes 1, and a PC-shaped desc is unchanged apart from the flags.cargo test -p d3d12_xs --lib -- --test-threads=1(TOMBOX_REMOVED_EXIT_MS=off): 666 passed, 4 failed, 71 ignored. The 4 failures are the ones that also fail onmainhere:alias::tests::msaa_depth_with_a_larger_pc_layout_never_overlaps_the_next_title_placement,placed_offset::tests::uneven_views_get_exact_helpers_and_msaa_shares_the_alias_heap,title_shadow::tests::buffer_then_texture_migrates_to_one_local_heap_and_keeps_bytes,xs_exports::console_fixed_tests::fixed_result_dxgix_exports_match_every_console_d3d12_xs(the last needs console dumps). The two newxone_queuetests pass.Not verified
Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-25T13:50:14Z.
Applied on main in
9a1e9ba(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed