d3d12: answer the console marker and capture entries #541

Merged
csj0oe merged 1 commit from upstream-pr/541 into main 2026-11-29 21:27:38 +00:00
csj0oe commented 2026-11-29 21:08:23 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by csj0oe on 2026-11-29T21:08:23Z.


What

The command-list and command-queue function tables now answer the marker and capture entries instead of falling through to the failure stub: list slots 59/60 (InsertGpuMarker, InsertTimingMarker), queue slots 11–15 (markers, begin/end event) and 20–22 (capture entries).

The marker blob is decoded from its header word — size, type, metadata and timestamp — with ANSI and UTF-16 names, bounds-checked; unknown shapes fall back to the opcode so begin/end ranges stay paired. Each recorded command keeps the innermost marker name, and the device-lost report prints it, which turns a bare draw or dispatch into … in "<title name>". Capture entries answer E_NOTIMPL once with a log line.

Tests

pix_markers calls each vtable entry with fabricated handles and checks the recorded names and capture results. Failing first: with the two list slots left as before, the slot test reports the wrong target.

The D3D12 unit binary passes under Wine (CPU only). No GPU or present gate was run, so a real marker range in a launch is still unverified; the entries are intentionally no-ops to the GPU.

<!-- greyfinch-sync:brcly/TuxBox:issue:5555138370 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/541). Originally posted by [csj0oe](https://github.com/csj0oe) on 2026-11-29T21:08:23Z. --- ## What The command-list and command-queue function tables now answer the marker and capture entries instead of falling through to the failure stub: list slots 59/60 (`InsertGpuMarker`, `InsertTimingMarker`), queue slots 11–15 (markers, begin/end event) and 20–22 (capture entries). The marker blob is decoded from its header word — size, type, metadata and timestamp — with ANSI and UTF-16 names, bounds-checked; unknown shapes fall back to the opcode so begin/end ranges stay paired. Each recorded command keeps the innermost marker name, and the device-lost report prints it, which turns a bare draw or dispatch into `… in "<title name>"`. Capture entries answer `E_NOTIMPL` once with a log line. ## Tests `pix_markers` calls each vtable entry with fabricated handles and checks the recorded names and capture results. Failing first: with the two list slots left as before, the slot test reports the wrong target. The D3D12 unit binary passes under Wine (CPU only). No GPU or present gate was run, so a real marker range in a launch is still unverified; the entries are intentionally no-ops to the GPU.
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
brcly/TuxBox!541
No description provided.