Skip to content

Runtime: add opt-in D3D12 call tracing - #701

Merged
ItsNotRexed merged 2 commits into
ItsNotRexed:mainfrom
lahlousaad4:runtime/trace-d3d12
Nov 22, 2026
Merged

ItsNotRexed merged 2 commits into
ItsNotRexed:mainfrom
lahlousaad4:runtime/trace-d3d12

Conversation

@lahlousaad4

Copy link
Copy Markdown
Contributor

Summary

  • Add gta6rt --trace-d3d12 to report numbered calls and outcomes for Xbox device creation and the instrumented Vulkan device, command-list, and queue paths.
  • Report failed submissions and unsupported methods while preserving the original API return values.
  • Keep the trace channel to fixed method names and outcomes. In trace mode, omit the legacy device-creation argument dump.
  • Document how to collect trace-only output with the Vulkan backend.

Coordination claim #634.

Testing

Windows 11, MSVC 19.44, RTX 4060 (610.88), Khronos validation enabled for the GPU fixture.

  • Four targeted CTest cases passed, including the CPU-only trace regression.
  • The Vulkan-backed COM fixture verified 61 ordered entries, including successful and rejected queue submissions. The verifier checks that tracing stays silent by default and omits a synthetic marker payload.
  • Ran gta6rt --run tiny_game.exe --trace-d3d12 -- hello 42 and verified the fixture received its original arguments.

Synthetic fixtures only.

@ismailchaka1

Copy link
Copy Markdown
Contributor

Tested 398f5b0 on an NVIDIA GeForce RTX 4070 SUPER, driver 32.0.16.1088, Windows 11, MSVC 2022 (Ninja, RelWithDebInfo), LEONIDA_VK_VALIDATION=1: pass.

PR head as-is, no game files. AI-assisted.

@ItsNotRexed
ItsNotRexed merged commit 51a5c3e into ItsNotRexed:main Nov 22, 2026
8 of 9 checks passed
ItsNotRexed pushed a commit that referenced this pull request Nov 22, 2026
- PE loader and import shims: the GameInput shim on SDL3 (#680) and
  gta6rt --trace-d3d12 (#701) are on main; neither was mentioned.
- Xbox D3D12 -> Vulkan: 3D render targets and texture views, depth- and
  stencil-plane views, packed formats (B5G6R5, B4G4R4A4, R9G9B9E5),
  predication and CPU-side texture reads and writes are on main. The
  "not yet" list now also names placed resources and 1D textures, which
  are still missing.

Each point checked against the code on main (b0befb4).

(cherry picked from commit 4f5559d)
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.

3 participants