From d3c4f349bd2bd8db17541411f4a2f74b2e5ed4e0 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 18 Nov 2026 18:23:55 -0800 Subject: [PATCH] rt README: a render state's first draw in a second topology class is a full compile on RADV, cold A recorded stream's frame 199 draws lines with a render pipeline state that until then drew only triangles. On the 780M under RADV, rt made that state's line pipeline at the draw in 214 to 226 ms, all of it in the driver's compile. It went through the same VkPipelineCache the triangle pipeline was made through, with no cache replacement between. The other contents' line pipelines took 0.9 to 1.5 ms there, and the Intel driver's took 0.1 ms. RADV reports dynamicPrimitiveTopologyUnrestricted false, so a pipeline made for one topology class cannot draw another, and its stages are compiled anew for the second class. With NGG culling off (RADV_DEBUG=nonggc) the line pipeline still took 225.0 ms, so culling is not the cause. Linking from graphics pipeline libraries would make that pipeline in milliseconds, but the floor does not require them, and rule 2 allows no second form for them. The planner ruled a known gap with this wording and no build. Verified: the 225 ms and the other contents' 0.9 and 1.5 ms are the probe player's line-make splits in job m3-max-49109 (780M, RADV, nonggc, a cold play to frame 201), and the 0.1 ms is job m3-max-49089's (Iris Xe, ANV, to frame 320). Docs only. --- crates/metal2vulkan-rt/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/metal2vulkan-rt/README.md b/crates/metal2vulkan-rt/README.md index f67750b99..36e354bad 100644 --- a/crates/metal2vulkan-rt/README.md +++ b/crates/metal2vulkan-rt/README.md @@ -1532,6 +1532,12 @@ or does not check is rebuilt from the generations' names, with young counted ful command buffers is `Gap::IndirectCommandBuffers`. The `completionHandler:` forms are not built. - Metal's triangle fill mode and depth clip mode, which Vulkan 1.3 bakes into a `VkPipeline`, are their defaults. +- On a driver that keeps the topology class in a pipeline (dynamicPrimitiveTopologyUnrestricted + false; RADV), a render pipeline state's first draw in a second topology class compiles a second + pipeline in full when the driver's cache is cold: 225 ms for the heaviest pipeline measured on a + 780M, 0.9 to 1.5 ms for the others, nothing once the driver's cache holds it. A driver without + the restriction serves it from its cache (0.1 ms on ANV). Linking from pipeline libraries would + avoid it; the floor does not have them. ## Render encoders