Squash-merged after diff review of PR #6751 - RT-5: the retail executable reaches 17 GDK runtime classes through 161 linked thunks, and imports no xgameruntime.dll
Squash-merged after diff review of PR #6899 - RT-5: how the retail executable calls the audio coprocessor, texture layout and DirectStorage imports (22, no shim)
@wasonidas measured the TG_SIZE_EN SGPR on gfx1036 through tools/hw_oracle (#6446): the low 12
bits matched, and the hardware also sets the wave index in [24:20] (Mesa's GFX10.3 field) and
bit 31 in the group's first wave (wave32 x 128: 80000004 00100044 00200084 003000c4). The prologue
now writes both. One pipeline-library program reads [24:20]; programs that mask with 0xfc0 or 0x3f
see the same value as before. Not measured on gfx1013.
test_cs_tg_size.py: the whole value with the new fields, and the four measured gfx1036 words.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The retail executable calls GetCustomHeapProperties with the return buffer in RCX and the device in RDX. The forwarder took RCX for the proxy and faulted.
AI-assisted.
The retail executable calls GetCustomHeapProperties (device slot 26) with the
C convention: the hidden return buffer in RCX and the device in RDX. The
proxy's generic forwarder assumed the PC C++ form (this in RCX, buffer in
RDX), took the buffer for the device and crashed on its vtable right after
D3D12XboxCreateDevice.
Slots 25 (GetResourceAllocationInfo, same rule, inferred) and 26 (measured)
now get thunks that accept either form: whichever of the first two arguments
is the device proxy is `this`. The runtime's own code still calls the proxy
through d3d12.h in the PC form. device_proxy_test calls both slots in both
forms against WARP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/import_call_sites.py finds an import's thunk and the call/jmp rel32 instructions that reach it, from the file
alone. On game_scarlett_master.exe: XMemVirtualAlloc 23 sites (every attributes value nonzero, protections carrying
PAGE_GRAPHICS bits), the physical-page family 21 sites with an AWE-shaped signature and 64 KiB pages, and the
constants the other xmem imports are called with. docs/xmem_exe_calls.md records them and what is still unmeasured.
libHttpClient.GDK.dll and XCurl.dll reach the GDK runtime through
xgameruntime.lib's thunks: LoadLibraryW("xgameruntime.dll"), then
GetProcAddress of InitializeApiImpl, InitializeApiImplEx,
InitializeApiImplEx2, QueryApiImpl, UninitializeApiImpl and XErrorReport.
The shims served only the first five. Without XErrorReport the thunks
refuse the runtime before they call any initializer: under gta6rt --run,
HCInitialize returned 0x89240101 (E_GAMERUNTIME_DLL_NOT_FOUND) and
curl_global_init returned CURLE_FAILED_INIT.
XErrorReport is now served by the function behind IXErrorImpl slot 3, so
a report reaches the XErrorSetCallback callback either way.
xgameruntime_test and the tiny_gdk_load fixture check all six names and
that a report through the export reaches the callback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Squash-merged after diff review of PR #6232 - script_qtable: a missing or unreadable input is one ERROR line and exit 2 (EGEN-SCRIPTQTABLE-MISSING-INPUT, DeepSeek2)
Squash-merged after diff review of PR #6228 - docs/first_light: the no-package run is 46 tests (42 passed, 4 skipped), not 19 (EGEN-FIRSTLIGHT-TEST-COUNT)
Squash-merged after review of PR #6317 - docs/testing: a Known problems row for GPU tests that crash on an uninvited implicit layer (EGEN-FPSMON-LAYER-ROW)
Squash-merged after review of PR #3988 - rdna2spirv: a pixel lane off at the last color export is not written; without vm, EXEC at the color export decides (measured on RDNA2)
Squash-merged after review of PR #4881 - anim_clips: count clip windows; the clip timing rule over all 785,174 entries (was 4,471 in 300 sampled dictionaries)
Squash-merged after review of PR #5110 - Runtime: D3D12 queues share a VkQueue when the GPU has no free one (Intel UHD 770 queueCount 1), plus a CPU-signal hang fix
Squash-merged after review of PR #5468 - gta6rt: link with an 8 MB stack; a game thread with the default size had 1 MB for a driver's compiler (RT-400)