docs(d3d12_vulkan): what the title does with GetDescriptorHandleIncrementSize (D3D12-DESCRIPTOR-INCREMENTS) #1143

Open
github-bot wants to merge 1 commit from github-bot/gh-1143 into main AGit
Owner

@⁠robot00f on GitHub · 2026-11-24 19:10 UTC · original
robot00f:docs/b2 → main · +34 −9 · 1 files · 1 commits · open

Claim: #14 (ID D3D12-DESCRIPTOR-INCREMENTS; earlier Spanish wording: #issuecomment-7140235047)

What

docs/d3d12_vulkan.md marked the console's GetDescriptorHandleIncrementSize values Open (section 3.4, and sections 3.2, 4, 8.2 referred to them the same way). This measures what the retail executable does with device slot 15 (offset 0x78).

The index holds 943 indirect calls through [device vtable + 0x78]. Resolving rcx from each function's start with capstone, 10 reach the device (the 0x148759D00 BSS device global or its 0x1475DF000-0x1475DF048 aliases); the other 933 call the same slot on another object and are counted, not attributed. Of the 10 device sites, all five D3D12_DESCRIPTOR_HEAP_TYPE values are passed and the return is used as a slot stride (add rdi, rax in two SRV-table builders), as a heap size (imul), as a slot count (div from a byte count) and once cached in a global; four of the five bootstrap queries discard it.

Why

So the layer knows it must answer with the host heap's increment, not a console constant: the game turns the value into sizes, divisions and GPU handle addresses, so a wrong stride corrupts every table it builds. The numeric console values stay Open (the doc says so); this also settles that the game does not hardcode them.

Nothing outside section 3.4 is reformatted; §7.1 (PR #1125) is untouched.

Tested

  • python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md — exit 0
  • python -I tests/test_docs_links.py — 16 tests OK
  • python -I tests/test_docs_table_rows.py — 2 tests OK
  • Docs only; the executable was not run.

GPUs tested: n/a

AI-assisted: yes (OpenCode)

**@⁠robot00f** on GitHub · 2026-11-24 19:10 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1143) `robot00f:docs/b2` → `main` · +34 −9 · 1 files · 1 commits · open Claim: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 (ID `D3D12-DESCRIPTOR-INCREMENTS`; earlier Spanish wording: #issuecomment-7140235047) ## What `docs/d3d12_vulkan.md` marked the console's `GetDescriptorHandleIncrementSize` values **Open** (section 3.4, and sections 3.2, 4, 8.2 referred to them the same way). This measures what the retail executable does with device slot 15 (offset `0x78`). The index holds 943 indirect calls through `[device vtable + 0x78]`. Resolving `rcx` from each function's start with capstone, 10 reach the device (the `0x148759D00` BSS device global or its `0x1475DF000`-`0x1475DF048` aliases); the other 933 call the same slot on another object and are counted, not attributed. Of the 10 device sites, all five `D3D12_DESCRIPTOR_HEAP_TYPE` values are passed and the return is used as a slot stride (`add rdi, rax` in two SRV-table builders), as a heap size (`imul`), as a slot count (`div` from a byte count) and once cached in a global; four of the five bootstrap queries discard it. ## Why So the layer knows it must answer with the *host* heap's increment, not a console constant: the game turns the value into sizes, divisions and GPU handle addresses, so a wrong stride corrupts every table it builds. The numeric console values stay **Open** (the doc says so); this also settles that the game does not hardcode them. Nothing outside section 3.4 is reformatted; §7.1 (PR #1125) is untouched. ## Tested - `python -I scripts/check_no_game_data.py docs/d3d12_vulkan.md` — exit 0 - `python -I tests/test_docs_links.py` — 16 tests OK - `python -I tests/test_docs_table_rows.py` — 2 tests OK - Docs only; the executable was not run. GPUs tested: n/a AI-assisted: yes (OpenCode)
Measured the executable's indirect calls through device slot 15
(offset 0x78): 943 sites, 10 of which reach the device global; all five
D3D12_DESCRIPTOR_HEAP_TYPE values are passed and sizes, divisions and
GPU handle strides are derived from the return. Records the table and
the consequence for the layer: return the host increment, not a
constant. Keeps the numeric console values Open.

D3D12-DESCRIPTOR-INCREMENTS
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:40:03 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 19:13 UTC · original · approved these changes

Reviewed and verified. Documents that the retail title actively derives descriptor strides, heap byte counts, and slot divisions from ID3D12Device::GetDescriptorHandleIncrementSize (slot 15) return values rather than hardcoding console constants. Concludes that returning host Vulkan descriptor sizes is essential to avoid table corruption. Clean-room compliant.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 19:13 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1143#pullrequestreview-6045692061) · **approved these changes** Reviewed and verified. Documents that the retail title actively derives descriptor strides, heap byte counts, and slot divisions from `ID3D12Device::GetDescriptorHandleIncrementSize` (slot 15) return values rather than hardcoding console constants. Concludes that returning host Vulkan descriptor sizes is essential to avoid table corruption. Clean-room compliant.
Author
Owner

@⁠Deedlyy on GitHub · 2026-11-24 20:13 UTC · original

Recommendation: [MERGE]

Reasoning: Docs: replaces the "Open" GetDescriptorHandleIncrementSize entries with a static measurement of the 10 device-reaching call sites of slot 15 and how the title uses the values. Documentation only, with method and evidence described. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 2/10

**@⁠Deedlyy** on GitHub · 2026-11-24 20:13 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1143#issuecomment-7143218356) **Recommendation:** [MERGE] **Reasoning:** Docs: replaces the "Open" `GetDescriptorHandleIncrementSize` entries with a static measurement of the 10 device-reaching call sites of slot 15 and how the title uses the values. Documentation only, with method and evidence described. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 2/10
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1143/head:github-bot/gh-1143'
git switch 'github-bot/gh-1143'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1143'
git switch 'github-bot/gh-1143'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1143'
git switch 'github-bot/gh-1143'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1143'
git switch 'main'
git merge --squash 'github-bot/gh-1143'
git switch 'main'
git merge --ff-only 'github-bot/gh-1143'
git switch 'main'
git merge 'github-bot/gh-1143'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.