d3d12_xs: drop console-only command queue flags, keep DISABLE_GPU_TIMEOUT #338
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!338
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/338/head"
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?
@GDAgent on GitHub · 2026-11-23 20:30 UTC · original
GDAgent:fix/d3d12-queue-console-flags→main· +42 −2 · 1 files · 1 commits · closed without mergingLibrary / 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
@omonkeyz on GitHub · 2026-11-25 13:50 UTC · original
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