The answer was, per format, the smallest power of two from 16 at which
a ShaderRead texture of every probed width took its in-place image. Two
things it did not cover:
- A texture that renders or that a shader writes takes the same
in-place image with those usages, whose linear layout the driver may
pitch otherwise. The probe now tries reading, reading and rendering,
and reading and a shader's writes (USAGES), and answers the largest of
the usages that ever lie in place (a usage the format's linear images
cannot take has none).
- The device's check of images in place measures lines of
nonCoherentAtomSize bytes (in_place::RowEnds), and on the Iris Xe its
renders and writes of texels that share a line with bytes beside them
fail (the line holding a row's last texels is written back whole). ANV
answered 16 against a 64-byte line, so a guest that laid a render
target out at 16 put its texels in a line with bytes before them: a
shadow. The answer is now at least nonCoherentAtomSize, "the size and
alignment in bytes that bounds concurrent access to host-mapped device
memory" (vkspec, Limits) (placed_answer). At it, a texture whose rows'
bytes fill whole lines shares none with other bytes. Rows whose bytes
are no multiple of the line keep their padding in their last line at
any alignment, so on ANV those stay shadows for renders and writes
whatever the answer; the docs say so.
Metal's 16 stays where the device imports no host pages, for a format
no usage brings in place, and where a probe failed. The record's VERSION
goes to 2, so no answer of the old probe is read again. Expected answers
(the venues' read answers with the line): ANV 16 -> 64, lavapipe 64,
RADV 256, MoltenVK 16 (its line is 16).
Tests: tests::linear_alignment's the_answer_is_the_usages_largest_and_
at_least_the_line (the rule over every committed profile's line, ANV's
16 before and 64 after); the lane's render-target test (previous commit)
gains the same texture at Metal's 16, a shadow wherever the check failed
such renders.