What: where the device links its render pipelines from graphics pipeline libraries, the
pre-rasterization and fragment shader libraries were made through the shader cache with no
VK_EXT_pipeline_creation_feedback, so every such making read the driver's data back and compared
its SHA-256 with what the cache was loaded with. They now chain the feedback as a whole
pipeline's making does (VariantObjects::library_of_shaders). A library that the driver reports
found in the cache its record loaded reads nothing back and writes nothing (driver_data_found).
The reports count in driver_pipeline_hits and misses, as the pipeline_records and cache lanes
already count a linked device's makings.
Why: tests::warm::a_pass_over_its_records_own_directory_counts_only_what_it_writes failed in 1 of
3 full runtime suites on PHOENIX. The cause is the device, not another test or the load. I probed
the driver's data before and after each making on gem10's Radeon 780M (RADV PHOENIX, Mesa
26.2.6, release, --cfg m2v_gpu): the test failed in 2 of 20 runs alone. In both, the state's two
libraries were found in their loaded records, and each left data of the record's length with
one byte different (of 1352 and 1092 bytes, at offsets 708 and 796). keep() took the new
SHA-256 for new data and wrote both records again, while counting no growth: "2 records' data
written, pipeline_bytes 0". Whole pipelines report found and read nothing back, so the same drift
on them wrote nothing. The data's format is the driver's own, so no comparison here reads its
entries; the driver's report decides.
The negative: tests::driver_pipeline_compile::a_library_of_shaders_reports_what_its_driver_found.
A second device, over the directory where a first device's creation of a state wrote, must count
one report per library of shaders (2), with found == hits, and where both are found it writes no
record. Without the fix it reads 0 hits and 0 misses and fails.
Verified on gem10's 780M (RADV PHOENIX via MESA_VK_DEVICE_SELECT=1002:15bf!, Mesa 26.2.6,
release, --cfg m2v_gpu), in one job over the test alone and then the fix:
- The test alone (the negative) fails: 0 reports, 2 records loaded. The warm test x100 without
the fix: 99 passed and 1 failed (2 records' data written, 2 found, 0 unchanged).
- With the fix:
- The new test passed x21: 2 hits, 0 misses, 2 found, 0 written.
- The warm test passed x101: 0 bytes, 0 written, 4 found.
- tests::warm, shader_cache and driver_pipeline_compile: 31 passed.
- The runtime suite (the GPU-hazard filter, the GPU-time tests left out) passed in 3 runs,
1964 tests each.
- runtime_lane::pipeline_records and runtime_lane::cache: 10 passed. Their second device
read loads 2, saves 0, found 2, hits 2.
- cargo clippy -p metal2vulkan-runtime --all-targets --all-features -D warnings is clean, plain
and with --cfg m2v_gpu.
(cherry picked from commit 037983e7a04af9346bcad1e4d4b61af864627fe0)