Runtime docs: the XR branch's measured price on textures of other formats

The runtime README's first known gap of textures said every float or half sample, gather and read
pays the BGR10_XR and BGRA10_XR word test and branch, with no number. It now gives the price the
compute harness measured, with and without the branch alternated in one job (GPU time, medians):

- Iris Xe (Mesa 26.2.6), m3-max-85317, 5 rounds: sampling +0.4%, sampling_distinct_512x512x16
  0.0%, texture_read -0.2%.
- RTX 3090 (NVIDIA 620.70.06), m3-max-85290, 3 rounds: 0.0%, 0.0%, +3.0% (texture_read's base
  rounds spread 3.2%, so that figure is within its noise; its mean is +2.0%).
- RX 7900 XTX (Mesa 26.2.6), m3-max-85291, 3 rounds: -0.2%, 0.0%, -0.4%.

These were measured on earlier forms of the branch: 85290 and 85291 before the map's operations
were kept uncontracted (NoContraction), and all three before a gather took its nearest code
(texel_nudge). Both changes add instructions inside the branch alone, which a texture of another
format does not run.
This commit is contained in:
Anees Iqbal committed 2026-12-03 16:18:20 -08:00
1 parent 3e3deb25b9
commit db7bedc60d
1 file changed
+8 -1
+8 -1
View File
@@ -2389,7 +2389,14 @@ once, as it is made, with no lock, and never rewritten for layouts.
- Every `float` or `half` sample, gather and read of a sampled colour image tests its texture's
word for `BGR10_XR` and `BGRA10_XR` and maps their codes in a branch (docs/API.md): on a texture
of any other format the read pays the word's test and the branch.
of any other format the read pays the word's test and the branch. In the compute harness's GPU
time, with and without the branch alternated in one run, `sampling`,
`sampling_distinct_512x512x16` and `texture_read` took +0.4%, 0.0% and -0.2% (medians of 5
rounds) on an Iris Xe (Mesa 26.2.6), 0.0%, 0.0% and +3.0% (medians of 3 rounds; `texture_read`'s
own rounds without the branch spread 3.2%) on an RTX 3090 (NVIDIA 620.70.06), and -0.2%, 0.0%
and -0.4% (3 rounds) on an RX 7900 XTX (Mesa 26.2.6). These were measured on earlier forms of
the branch; its later changes (on the RTX 3090 and the RX 7900 XTX the map's operations kept
uncontracted, on all three a gather's nearest code) add work inside the branch alone.
- A sample of a `BGR10_XR` or `BGRA10_XR` texture past its edge through a sampler's
`ClampToBorderColor` or `ClampToZero` reads the device's border colour as a code (opaque white
as `1.2529`, `BGRA10_XR`'s `1.2549`; black as `-0.7529`) where Metal reads 0 or 1, and a linear