mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:30:52 +01:00
[PR #1045] docs(d3d12_command_objects): 0x48/0x50 are heap handle getters on heap objects (D3D12-HEAP-HANDLE-SLOTS) #1080
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1080
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1045
Author: @robot00f
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:docs/agent2📝 Commits (1)
6994562docs(d3d12_command_objects): 0x48/0x50 are heap handle getters on heap objects📊 Changes
1 file changed (+78 additions, -1 deletions)
View changed files
📝
docs/d3d12_command_objects.md(+78 -1)📄 Description
Closes nothing (docs only). Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7138270960
Item:
D3D12-HEAP-HANDLE-SLOTS.What
docs/d3d12_command_objects.mdgets a new §2.1a: a byte offset is not a method, and0x48/0x50are ambiguous by offset alone.0x148759D00)0x48isCreateCommandAllocator;0x50is unused.ID3D12DescriptorHeapthe same offsets areGetCPUDescriptorHandleForHeapStart(0x48) andGetGPUDescriptorHandleForHeapStart(0x50), because the interface inherits eightIUnknown/ID3D12Object/ID3D12DeviceChildslots and starts its own methods at0x40(d3d12.h:5768/5775/5782).The section states the rule (resolve the receiver, not the offset), gives the two signature shapes, and gives the counts below. §3.2's FSR note now points at it.
Why
Several pages summarise call sites as "the 29 calls at
0x48" or "device slot 9", and a reader can carry that offset to a heap object and land two methods early/late. The pair also collides withID3D12CommandQueue(0x48CopyTileMappings,0x50ExecuteCommandLists), so a replacement runtime that keys on the offset alone will wire the wrong method.Measurements (no game data, nothing executed)
+0x48/+0x50call site: 2 device sites at0x48, none at0x50. Both are in0x142478440(0x142478B2Dedx=0,0x142478C3Bedx=2) and pass&IID_ID3D12CommandAllocator(0x1461E0658). The other four+0x48sites there are twoClosecalls on the new list and two no-argument getter calls on globals.0x141CF3280calls device0x70(CreateDescriptorHeap,&IID_ID3D12DescriptorHeapat0x1461E0628), then the returned heap at0x141CF3358(0x48) and0x141CF3392(0x50) with onlythis, caches the CPU handle, asserts it against the expected base, and subtracts it from the GPU handle to store the base delta.0x141C744F0(0x141C74559) uses the0x48return as a descriptor base and strides it by the device0x78increment.0x70and0x48; 81 call0x70and0x50. In 19 of the 99, a+0x48/+0x50receiver traces to theCreateDescriptorHeapreturn — 47 sites, 14 of them passing onlythis.0x14080C3E0(inner boolean pair),0x14049E200(CRetValout pointer),0x140087040(dispatch thunk forwardingrdx/r8),0x141993B30(heap register reloaded from a factory global).Tested
python -I scripts/check_no_game_data.py docs/d3d12_command_objects.md→ exit 0python -m compileall -q make_game.py tools tests→ exit 0Docs only, no code paths changed.
GPUs tested: n/a
AI-assisted: yes (OpenCode)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.