runtime: test every graphics memory type at the granularity boundary #365

Manually merged
github merged 1 commit from gh-pr/365/head into gh-pr/365/base 2026-11-26 21:46:14 +00:00
Owner

@⁠grahamster2 on GitHub · 2026-11-21 23:28 UTC · original
grahamster2:runtime/era-heap-graphics-types → main · +73 −1 · 3 files · 1 commits · merged 2026-11-22 02:38 UTC

Advances the README "Windows runtime" row: a source-built allocation case with a measurable Windows result.

What

New era_heap_graphics_types scenario. Graphics memory types 1–6 × page sizes 4 KB/64 KB × alignment exponents 0/4/8/16 × sizes 1 and granularity+1. Each block must start on the allocation granularity, be zeroed and writable, and be reported by VirtualQuery as the base of its own committed private read/write allocation; after release_with_attributes it must be MEM_FREE. Negative controls per type: 4 MB pages, exponent 17 and page size 3 return null. Exponent 16 checks the 64 KiB boundary itself.

Before this, only type 5 (the AMD word) had a positive graphics test.

Evidence

Commit: bab6fdb, Windows 11 Pro build 26200, VS Build Tools 2026 18.3 (MSVC 19.50.35725), Windows SDK 10.0.26100.

ctest --preset dev --no-tests=error -R '^(era_heap_|docs_links$)' -V
graphics_served=96 graphics_rejected=18 granularity=65536
100% tests passed, 0 tests failed out of 9

Full suite at the same commit (excluding the three tests/intake cases): 144 run, 0 failed, 3 capability skips (bvh_wave64_hardware on RTX 3080 lane range 32..32; bvh_wave64_warp and wave_shuffle_warp on WARP lane range 4..4).

Mutation checks on src/era_heap.cpp (reverted, not part of this PR):

  • > → >= at the granularity comparison: era_heap_graphics_types fails (type 1, exponent 16 refused); era_heap_observed_words also fails.
  • graphics_last 6 → 5: only era_heap_graphics_types fails (type 6 refused).

Scope

Desktop policy only. The console semantics of the graphics types stay open in #126.

🤖 Generated with Claude Code

AI-assisted (Claude Code).

**@⁠grahamster2** on GitHub · 2026-11-21 23:28 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/365) `grahamster2:runtime/era-heap-graphics-types` → `main` · +73 −1 · 3 files · 1 commits · merged 2026-11-22 02:38 UTC Advances the README "Windows runtime" row: a source-built allocation case with a measurable Windows result. ## What New `era_heap_graphics_types` scenario. Graphics memory types 1–6 × page sizes 4 KB/64 KB × alignment exponents 0/4/8/16 × sizes 1 and granularity+1. Each block must start on the allocation granularity, be zeroed and writable, and be reported by `VirtualQuery` as the base of its own committed private read/write allocation; after `release_with_attributes` it must be `MEM_FREE`. Negative controls per type: 4 MB pages, exponent 17 and page size 3 return null. Exponent 16 checks the 64 KiB boundary itself. Before this, only type 5 (the AMD word) had a positive graphics test. ## Evidence Commit: `bab6fdb`, Windows 11 Pro build 26200, VS Build Tools 2026 18.3 (MSVC 19.50.35725), Windows SDK 10.0.26100. ctest --preset dev --no-tests=error -R '^(era_heap_|docs_links$)' -V graphics_served=96 graphics_rejected=18 granularity=65536 100% tests passed, 0 tests failed out of 9 Full suite at the same commit (excluding the three `tests/intake` cases): 144 run, 0 failed, 3 capability skips (`bvh_wave64_hardware` on RTX 3080 lane range 32..32; `bvh_wave64_warp` and `wave_shuffle_warp` on WARP lane range 4..4). Mutation checks on `src/era_heap.cpp` (reverted, not part of this PR): - `>` → `>=` at the granularity comparison: `era_heap_graphics_types` fails (type 1, exponent 16 refused); `era_heap_observed_words` also fails. - `graphics_last` 6 → 5: only `era_heap_graphics_types` fails (type 6 refused). ## Scope Desktop policy only. The console semantics of the graphics types stay open in #126. 🤖 Generated with [Claude Code](https://claude.com/claude-code) _AI-assisted (Claude Code)._
era_heap serves graphics memory types 1-6 from VirtualAlloc when the page
size and alignment fit the 64 KiB allocation granularity, but only type 5
had a positive test. Add era_heap_graphics_types: all six types with 4 KB
and 64 KB pages and alignment exponents 0, 4, 8 and 16 must return a
committed private read/write region that starts on the granularity, is
zeroed, and is MEM_FREE after release_with_attributes. For each type,
4 MB pages, exponent 17 and page size 3 must return null.

Narrowing the graphics range to types 1-5 passed every existing era_heap
test; the new case fails it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:46:12 +00:00
github manually merged commit bab6fdb289 into gh-pr/365/base 2026-11-26 21:46:14 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.