Files
metal2vulkan/crates
Anees Iqbal a61fd09bc7 Lane: a points' library of shaders is made under its state's pre-rasterization record
runtime_lane::pipeline_records::a_later_device_makes_every_pipeline_an_earlier_one_made_from_its_records
failed on every device that links its pipelines from libraries in the round at
d0f800ddd0 (Iris Xe, RTX 3090, RTX 5080 Laptop, RX 7900 XTX, Radeon 780M):
"the points' making wrote its record", 0 saves where it expected 1 (on the 780M,
"the driver reported (1, 2), not (0, 3)" instead). It passed at 892e4b230b.

The change that did it is 5a1e043784 (RUNTIME_VERSION 2068), which made a library
of shaders under its part's record (GraphicsContent::record_parts) in place of its
library name. A part's record leaves out the depth bias, as a whole pipeline's
record already did, and names no topology (the point class is in a whole
pipeline's record alone). The points' pre-rasterization state differs from the
triangles' only in the bias (Metal biases triangles alone), so the points' library
is now made under the triangles' pre-rasterization record, in the cache the
state's creation made. The product lost nothing: every one of those drivers
reported the points' library found in that cache (pipeline_hits 0 -> 1 at the
points' draw, PIPELINE-RECORDS "first device, drawn"). The driver compiled
nothing, so no data was added and no record was written. A later device loads
that record at the state's creation, and its points' library is found there. The
test's expectation of a record of the points' own was stale on these devices.

The test now counts the records the makings name apart from the makings
(Makings::points_own: 1 where pipelines are made whole, 0 where they are linked).
On the first device, the points' makings load nothing and each reads its data:
unchanged, or written again where the driver's data grew (the 780M's RADV wrote
the shared record again, saves 2 -> 3). A making under a record of its own writes
it. The driver reports the shared ones found and the rest compiled. On the second
device, assert_loaded takes the records loaded and the makings from them apart:
the points' library loads nothing and is handed the loaded cache. The record
counts are the creation's plus the points' own. The module docs drop "the driver
reports no hit or miss of a library", which has been false since libraries report
(5cd5f93c9e). record_parts' doc says the points' library shares the record, and
on which drivers it was seen found.

Verification: the pipeline_records lane tests on lavapipe and the Iris Xe at this
tip, in the report to main.
2026-11-11 19:31:37 -08:00
..