Skip to content

D3D12.X: queue #18 before the layout is known writes 8 bytes - #121

Merged
ivall merged 1 commit into
xcl-dev:mainfrom
gefydev:d3d12x-queue-slot18
Nov 23, 2026
Merged

ivall merged 1 commit into
xcl-dev:mainfrom
gefydev:d3d12x-queue-slot18

Conversation

@gefydev

@gefydev gefydev commented Nov 23, 2026

Copy link
Copy Markdown
Member

#104 item 4.

Until the title's calls show which queue layout it has, queue_dispatch sent #18 to the older layout's GetDesc, which writes a 16-byte D3D12_COMMAND_QUEUE_DESC. On the newer layout #18 is GetTimestampFrequency(UINT64*), so a call before the first Signal wrote 8 bytes past the out-param.

Changes:

Cost: an older-layout title that calls GetDesc before it signals anything gets Flags / NodeMask unwritten. Before this change, a newer-layout title in the same position had its stack overwritten.

Test queue_slot_18_before_the_layout_is_known_writes_8_bytes uses a fake adopted queue (its own PC table). It checks the 8-byte write before the layout is known, then the full description after a fenced Signal at #14. Without the change it fails (all 16 bytes written). The other lib tests that run on a GTX 1650 under Wine pass too. Not run with a retail title.

Until a title's queue calls show which console layout its runtime has,
queue xcl-dev#18 went to the older layout's GetDesc, which writes a 16-byte
D3D12_COMMAND_QUEUE_DESC. On the newer layout xcl-dev#18 is
GetTimestampFrequency(UINT64*), so a call before the first Signal wrote 8
bytes past the title's out-param.

A Signal / Wait with a fence at xcl-dev#14 / xcl-dev#15 now marks the older layout. Until
one of the layouts is known, xcl-dev#18 writes only the first 8 bytes of the
description (type and priority) and logs a warning once. After that it is
the full GetDesc (older) or GetTimestampFrequency (newer), as before.

Test queue_slot_18_before_the_layout_is_known_writes_8_bytes (fake adopted
queue).
@ivall
ivall merged commit 0a82d92 into xcl-dev:main Nov 23, 2026
@ivall

ivall commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Merged. Checked on Windows 11 with an RX 9070 (RDNA4), merged together with the rest of #110–#129: cargo test --workspace green with the retail samples (shader pack, console DLLs, texture archive), lib tests also with XCL_SPLIT_WAVE64=1; the retail pack still translates 26 698 / 26 698; the FSR4 GPU probe passes; Unicorn Overlord and XDefiant run. Thanks!

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.

2 participants