[removed by author] #156

Manually merged
github merged 1 commit from gh-pr/156/head into gh-pr/156/base 2026-11-26 21:30:57 +00:00
Owner

@⁠thegl0w on GitHub · 2026-11-21 17:45 UTC · original
xmem/virtual-query-desktop → main · +341 −1 · 6 files · 1 commits · merged 2026-11-21 17:47 UTC

[removed by author]

**@⁠thegl0w** on GitHub · 2026-11-21 17:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/156) `xmem/virtual-query-desktop` → `main` · +341 −1 · 6 files · 1 commits · merged 2026-11-21 17:47 UTC [removed by author]
Write the Win32 MEMORY_BASIC_INFORMATION to bytes 0x00-0x2F, which the
four BVH callers read at +0x20 (State) and +0x24 (Protect). The byte at
+0x30 has no public definition, so fill it by a desktop policy:
0x01 for addresses in regions registered with register_gpu_region,
0x00 otherwise, current process only, later bytes untouched. With
registration the callers' predicates accept GPU-intended memory and
reject the rest. Add era_query_fields, _tail, _registry and _short.

What the console's tail byte means remains open, and
XMemGetWorkingSetStatistics gets no handler.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:30:57 +00:00
github manually merged commit e5a519dc89 into gh-pr/156/base 2026-11-26 21:30:57 +00:00
Author
Owner

@⁠lukaslw-lab on GitHub · 2026-11-22 07:13 UTC · original

AI-assisted (Claude Code).

This answers the first "Unconfirmed" item above (what the +0x30 byte means): the BVH DLL's own messages say it means GPU memory.

XboxBvhBuilder.dll with SHA-256 99f803ac22c01ef329dddb1d40be67238d2a812d01e8d040b3cb5135bc23707e (the pinned hash). RVAs are relative to the image base.

How it was checked: static disassembly in IDA 9.1, no execution. To repeat it, follow the cross-references from the XMemVirtualQuery import and from the four message strings (0xccf20, 0xccf80, 0xcd010, 0xcd060). Each failed check in a path branches to the one string load that path uses.

All four calls are in one function (0x19bb0). Its only caller is XboxBvhBuilder::ValidateRehydrateAccelerationStructureBuildDesc. In each path, every failed check leads to one message:

Call Checks Message
0x19c69 source +0x30 & 3, MEM_COMMIT, Protect & 6 "…point to CPU-readable memory"
0x19ccb destination +0x30 & 3, MEM_COMMIT "…must point to GPU memory"
0x19d9d index buffer +0x30 & 3, MEM_COMMIT "…must point to GPU-readable memory"
0x19df9 vertex buffer +0x30 & 3, MEM_COMMIT "…must point to GPU-readable memory"
  • The destination, index and vertex paths check only +0x30 and commit, and their messages ask for GPU memory. So the +0x30 test means GPU memory, which matches era_query's current policy. No code change is needed.
  • In the source path, "CPU-readable" comes from the extra Protect & 6 check: a rehydration source is read by the CPU. xcl's "CPU-readable" interpretation quotes that message (credit to xcl for the string).
  • The DLL never reads individual values of the field, so it can't show what each of bits 0–1 means.

Suggested docs/experiments.md addition to the era_query section: "the BVH DLL's diagnostics identify the +0x30 test as a GPU-memory requirement (the table above)". Also, the XMemVirtualQuery function page on docs.xbox.com is public; only the result structure's page is restricted.

**@⁠lukaslw-lab** on GitHub · 2026-11-22 07:13 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/156#issuecomment-7075788167) _AI-assisted (Claude Code)._ This answers the first "Unconfirmed" item above (what the `+0x30` byte means): **the BVH DLL's own messages say it means GPU memory.** `XboxBvhBuilder.dll` with SHA-256 `99f803ac22c01ef329dddb1d40be67238d2a812d01e8d040b3cb5135bc23707e` (the pinned hash). RVAs are relative to the image base. How it was checked: static disassembly in IDA 9.1, no execution. To repeat it, follow the cross-references from the `XMemVirtualQuery` import and from the four message strings (`0xccf20`, `0xccf80`, `0xcd010`, `0xcd060`). Each failed check in a path branches to the one string load that path uses. All four calls are in one function (`0x19bb0`). Its only caller is `XboxBvhBuilder::ValidateRehydrateAccelerationStructureBuildDesc`. In each path, every failed check leads to one message: | Call | Checks | Message | |---|---|---| | `0x19c69` source | `+0x30 & 3`, `MEM_COMMIT`, `Protect & 6` | "…point to CPU-readable memory" | | `0x19ccb` destination | `+0x30 & 3`, `MEM_COMMIT` | "…must point to GPU memory" | | `0x19d9d` index buffer | `+0x30 & 3`, `MEM_COMMIT` | "…must point to GPU-readable memory" | | `0x19df9` vertex buffer | `+0x30 & 3`, `MEM_COMMIT` | "…must point to GPU-readable memory" | - The destination, index and vertex paths check only `+0x30` and commit, and their messages ask for GPU memory. So the `+0x30` test means GPU memory, which matches `era_query`'s current policy. No code change is needed. - In the source path, "CPU-readable" comes from the extra `Protect & 6` check: a rehydration source is read by the CPU. xcl's "CPU-readable" interpretation quotes that message (credit to xcl for the string). - The DLL never reads individual values of the field, so it can't show what each of bits 0–1 means. Suggested `docs/experiments.md` addition to the `era_query` section: "the BVH DLL's diagnostics identify the `+0x30` test as a GPU-memory requirement (the table above)". Also, the `XMemVirtualQuery` function page on docs.xbox.com is public; only the result structure's page is restricted.
github-bot changed title from Add a desktop XMemVirtualQuery handler for the BVH call sites to [removed by author] 2026-12-02 09:38:30 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.