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

Open
opened 2026-11-26 20:20:21 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1143
Author: @robot00f
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: docs/b2


📝 Commits (1)

  • 75cf835 docs(d3d12_vulkan): what the title does with GetDescriptorHandleIncrementSize

📊 Changes

1 file changed (+34 additions, -9 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+34 -9)

📄 Description

Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7141413757 (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)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1143 **Author:** [@robot00f](https://github.com/robot00f) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docs/b2` --- ### 📝 Commits (1) - [`75cf835`](https://github.com/ubiquitarianism/leonida/commit/75cf835c3d7e719b42cf732586376818b0d0b213) docs(d3d12_vulkan): what the title does with GetDescriptorHandleIncrementSize ### 📊 Changes **1 file changed** (+34 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+34 -9) </details> ### 📄 Description Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7141413757 (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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1176
No description provided.