D984 - In-world frame costs: host page queries, texel offset tables and dispatch buffer size classes

Status: decided Date: 2026-10-25 known_by: measured

A lazily committed reservation keeps the spans it knows are committed. A commit inside those spans asks the host nothing, because nothing decommits a page while its reservation is held; the fault path consults the same record first. A write-watch harvest goes one recorded reservation at a time and asks the host for the written pages directly, never where its regions end. A guard is set or released over its whole range in one protection call where the host allows it, and piece by piece only where it does not.

Detiling and tiling read each layout's offsets once per column and once per row into an offset table, then place each texel with two lookups, an add and an exclusive or. This rests on a block-tiled offset being the block's start plus the exclusive or of a term of x, a term of y and a constant; tests check the tables against the texel-by-texel path for every layout, with and without the pipe-bank exclusive or. Detiling is spread over threads.

Dispatch buffers are kept by size class, each within a quarter of the size asked for, and nothing past the size asked for is read (amends D805). A dispatch image's bytes are detiled where they lie rather than copied first.

Why: Grand Theft Auto V's in-world prologue took 40.1 s of command-processor time per flip, measured from its first in-world window with the command processor sampled. Of each flip:

Rejected: