upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/shims/registry.cpp
diff options
context:
space:
mode:
authorNolan Cotter <186326284+NolanCotter@users.noreply.github.com>2026-11-22 07:57:37 -0700
committerNolan Cotter <186326284+NolanCotter@users.noreply.github.com>2026-11-22 07:57:55 -0700
commit8fc8147bf3e4395e9943a53675582cb2153bddb4 (patch)
treeaea4ac05cd85defb33c49654ba25b8b4b87a755b /runtime/shims/registry.cpp
parent6a6704df1592e1dc4a3215ddf1423a78adb52045 (diff)
docs+shims: fold in the measured Xbox ABI surface from sibling layers
Other Xbox Series compatibility-layer efforts have run the same package's console DLLs, shader pack and retail titles. This folds their published measurements into docs/d3d12_vulkan.md §7 — the CS root-argument packing, the inline record opcodes, the mesh inputs, the OpenExistingHeapFromAddress UMA recipe, 64 KiB physical pages, more command-list slot numbers and the console export surface — each row paraphrased with its measurement basis noted. The unimplemented-import classifier learns the console DLL names from that surface (d3d12_xs!D3D12XboxCreateSyntheticDevice, xaudio2_9!XAudio2Create, gameinput!GameInputCreate, dstorage_xs!DStorageGetFactory) so fail/stop policies report E_NOTIMPL honestly instead of faking success; functions with no measured return (xg_xs, AcpHal, D3D12XboxSetProcessDebugFlags) stay `other`. Classification checks added to unimplemented_policy_test. AI-assisted. Tested: test_i18n_index, test_docs_links, compileall. The registry/test change is Windows-only C++ and was not compiled here.
Diffstat (limited to 'runtime/shims/registry.cpp')
-rw-r--r--runtime/shims/registry.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/runtime/shims/registry.cpp b/runtime/shims/registry.cpp
index 4c6a0d60b..3d1c12a56 100644
--- a/runtime/shims/registry.cpp
+++ b/runtime/shims/registry.cpp
@@ -60,6 +60,9 @@ std::vector<Lookup> g_lookups;
60// D3D12XboxCreateDevice is matched by exact name: the console-only function has no public 60// D3D12XboxCreateDevice is matched by exact name: the console-only function has no public
61// reference page that could be reached; it is the factory this repo measured (it returns 61// reference page that could be reached; it is the factory this repo measured (it returns
62// an HRESULT with the device in an out parameter, docs/d3d12_vulkan.md), not a documented one. 62// an HRESULT with the device in an out parameter, docs/d3d12_vulkan.md), not a documented one.
63// D3D12XboxCreateSyntheticDevice is the other console-only factory the sibling export
64// inventories list (docs/d3d12_vulkan.md §7); same Create*Device HRESULT shape.
65// D3D12XboxSetProcessDebugFlags is left out: nothing measured its return.
63// dxgi.dll CreateDXGIFactory, CreateDXGIFactory1, CreateDXGIFactory2, DXGIGetDebugInterface1 and 66// dxgi.dll CreateDXGIFactory, CreateDXGIFactory1, CreateDXGIFactory2, DXGIGetDebugInterface1 and
64// DXGIDeclareAdapterRemovalSupport return HRESULT (win32/api/dxgi/nf-dxgi-createdxgifactory, 67// DXGIDeclareAdapterRemovalSupport return HRESULT (win32/api/dxgi/nf-dxgi-createdxgifactory,
65// dxgi1_3 and dxgi1_6 pages). Not the whole DXGI* prefix: only these names were verified. 68// dxgi1_3 and dxgi1_6 pages). Not the whole DXGI* prefix: only these names were verified.
@@ -69,6 +72,13 @@ std::vector<Lookup> g_lookups;
69// XGameRuntimeInitialize and XGameEventWrite: HRESULT. 72// XGameRuntimeInitialize and XGameEventWrite: HRESULT.
70// Mixed families (XSystem*, XGameStreaming*, XThread*, XDisplay*, XGameRuntimeFeature*) are 73// Mixed families (XSystem*, XGameStreaming*, XThread*, XDisplay*, XGameRuntimeFeature*) are
71// left out on purpose. 74// left out on purpose.
75// gameinput.dll GameInputCreate: HRESULT (gaming/gdk/docs/reference/input/gameinput/functions/
76// gameinputcreate). The shim implements it (runtime/shims/gameinput.cpp); the class is
77// listed anyway for a build or import it misses.
78// xaudio2_9.dll XAudio2Create: HRESULT (learn.microsoft.com/windows/win32/api/xaudio2/
79// xaudio2_9redist.dll nf-xaudio2-xaudio2create). xaudio2_9.dll is the console name (docs/d3d12_vulkan.md §7).
80// dstorage.dll DStorageGetFactory: HRESULT (learn.microsoft.com/windows/win32/api/dstorage/
81// dstorage_xs.dll nf-dstorage-dstoragegetfactory). dstorage_xs.dll is the console name.
72const char* const kNotHResult[] = { 82const char* const kNotHResult[] = {
73 "XAsyncCancel", "XAsyncComplete", 83 "XAsyncCancel", "XAsyncComplete",
74 "XTaskQueueCloseHandle", "XTaskQueueDispatch", "XTaskQueueGetCurrentProcessTaskQueue", 84 "XTaskQueueCloseHandle", "XTaskQueueDispatch", "XTaskQueueGetCurrentProcessTaskQueue",
@@ -89,12 +99,18 @@ ReturnClass classify(const std::string& dll, const std::string& name) {
89 if (dll == "d3d12.dll" || dll == "d3d12_xs.dll") { 99 if (dll == "d3d12.dll" || dll == "d3d12_xs.dll") {
90 if (starts_with(name, "D3D12Create") || starts_with(name, "D3D12Serialize") || 100 if (starts_with(name, "D3D12Create") || starts_with(name, "D3D12Serialize") ||
91 name == "D3D12GetDebugInterface" || name == "D3D12EnableExperimentalFeatures" || 101 name == "D3D12GetDebugInterface" || name == "D3D12EnableExperimentalFeatures" ||
92 name == "D3D12XboxCreateDevice") 102 name == "D3D12XboxCreateDevice" || name == "D3D12XboxCreateSyntheticDevice")
93 return ReturnClass::HResult; 103 return ReturnClass::HResult;
94 } else if (dll == "dxgi.dll") { 104 } else if (dll == "dxgi.dll") {
95 if (starts_with(name, "CreateDXGIFactory") || name == "DXGIGetDebugInterface1" || 105 if (starts_with(name, "CreateDXGIFactory") || name == "DXGIGetDebugInterface1" ||
96 name == "DXGIDeclareAdapterRemovalSupport") 106 name == "DXGIDeclareAdapterRemovalSupport")
97 return ReturnClass::HResult; 107 return ReturnClass::HResult;
108 } else if (dll == "xaudio2_9.dll" || dll == "xaudio2_9redist.dll") {
109 if (name == "XAudio2Create") return ReturnClass::HResult;
110 } else if (dll == "gameinput.dll") {
111 if (name == "GameInputCreate") return ReturnClass::HResult;
112 } else if (dll == "dstorage.dll" || dll == "dstorage_xs.dll") {
113 if (name == "DStorageGetFactory") return ReturnClass::HResult;
98 } else if (dll == "xgameruntime.dll") { 114 } else if (dll == "xgameruntime.dll") {
99 if (name == "XGameRuntimeInitialize" || name == "XGameEventWrite") return ReturnClass::HResult; 115 if (name == "XGameRuntimeInitialize" || name == "XGameEventWrite") return ReturnClass::HResult;
100 for (const char* n : kNotHResult) 116 for (const char* n : kNotHResult)