[Help Wanted] Fix real _GAMING_XBOX_SCARLETT d3d12_xs ABI gaps (ID3D12Device8+ proxy escape, IDXGIDevice1 QI, WaitFrameEventX/PresentX ABI) #18
Labels
No labels
accessibility
bug
cross-platform
documentation
duplicate
enhancement
gdk-shims
good first issue
graphics
hardware-report
help wanted
invalid
question
shaders
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/californiaAlmonds--OpenScarlett#18
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@californiaAlmonds on GitHub · 2026-11-22 08:35 UTC · original
Summary
Live bring-up of Microsoft's untouched MIT
Xbox-GDK-Samples/Samples/IntroGraphics/SimpleTrianglecompiled under/D_GAMING_XBOX_SCARLETT /D_GAMING_XBOXagainst OpenScarlett exposed 6 concreted3d12_xs/ PLM ABI mismatches that PC-GDK tests do not hit:DeviceX::QueryInterfacesilent bypass onID3D12Device8+:_GAMING_XBOX_SCARLETTtitles request__uuidof(ID3D12Device8)(and up toID3D12Device12in newer GDKs) fromD3D12XboxCreateDevice.DeviceXcurrently wraps throughID3D12Device6and falls through tohost_dev_->QueryInterface(riid, ppvObject)(src/gpu/d3d12_xs/device_x.cpp), returning the raw unwrapped Windows device and immediately releasing/deletingDeviceXon frame 0.IDXGIDevice1/IDXGIDeviceonDeviceX::QueryInterface:DeviceResources::RegisterFrameEvents()callsm_d3dDevice.As(&dxgiDevice)->GetAdapter()->EnumOutputs(0). Desktop D3D12 does not implementIDXGIDevice1onID3D12Device— only Xboxd3d12_xsdoes.IDXGIDevice1sub-interface returning the active hostIDXGIAdapter(with a safe syntheticIDXGIOutputfallback on headless CI runners).WaitFrameEventX5-arg vs 4-arg ABI crash:WaitFrameEventX(Event, TimeoutMilliseconds, pReserved, Flags, &pOutToken)(5 args).DeviceX::WaitFrameEventXcurrently takes 4 args, causingFlags = 0to be dereferenced aspOutToken.PresentX3-arg vs 4-arg ABI mismatch:ID3D12CommandQueue::PresentX(PlaneCount, pPlaneParameters, pPresentParameters)(3 args), withD3D12XBOX_FRAME_PIPELINE_TOKENand standardDXGI_COLOR_SPACE_TYPEinsideD3D12XBOX_PRESENT_PLANE_PARAMETERS(and supportsPlaneCount == 0, pPlaneParameters == nullptrfor blank/suspend presents).D3D12XBOX_CREATE_DEVICE_PARAMETERS& GDKX vtable layout:D3D12XBOX_CREATE_DEVICE_PARAMETERSfields with GXDK 221000+ (Version,ProcessDebugFlags,GraphicsCommandQueueRingSizeBytes,DisableGeometryShaderAllocations,DisableTessellationShaderAllocations,DisableDXR,CreateDeviceFlags,AmplificationShaderIndirectArgsBufferSize,AmplificationShaderPayloadBufferSize) instead of reading custom offsets.SetFrameIntervalX,ScheduleFrameEventX,WaitFrameEventX,PresentX,SuspendX,ResumeX) are directly callable via standard GDKX device/queue interfaces.appnotify.hPLM notification exports:RegisterAppStateChangeNotification,UnregisterAppStateChangeNotification,RegisterAppConstrainedChangeNotification, andUnregisterAppConstrainedChangeNotificationbacked by a thread-safe callback registry.Key Files
src/gpu/d3d12_xs/device_x.h/src/gpu/d3d12_xs/device_x.cppsrc/gpu/d3d12_xs/command_queue_x.h/src/gpu/d3d12_xs/command_queue_x.cppsrc/shims/d3d12_xs_shim.cppsrc/shims/(PLMappnotify.hexports)Acceptance Criteria
DeviceX::QueryInterfacewrapsID3D12Device7–ID3D12Device12(as supported by host) and never leaks rawhost_dev_for anyID3D12Device*IID.DeviceX::QueryInterface(IID_IDXGIDevice1)returns a working adapter/output path on both desktop GPUs and headless CI.WaitFrameEventX(5-arg),PresentX(3-arg), GXDK 221000+D3D12XBOX_CREATE_DEVICE_PARAMETERS, andappnotify.hPLM APIs have passing unit tests.ctest --output-on-failurepasses with 0 regressions and 0 warnings.Want to claim this or coordinate before starting? Comment below or drop into our Discord: https://discord.gg/sShMY2fjR