Ask every line-rasterizing pipeline for Bresenham's line mode

The steps this packet landed as, in order:
- Retire the line-rectangle gap and record the tie that is the driver's

Content: the tree of `development` at 733c5801ce, unchanged.
This commit is contained in:
Anees Iqbal committed 2026-10-26 13:19:14 +02:00
1 parent cc34c055c4
commit 73c4e3ab3c
14 files changed
+140 -41

No files matched your search

@@ -165,14 +165,10 @@ half-texel-nans-rgba16f RADV divergent case/words/nearest-sample 2045 elements d
sample-fills-d32-2 RADV divergent case/samples/d32-2 1 line differs: Metal "after s0 y1: | 3e800000 3e800000 | 00000001 3f800000 | 00000001 3f800000 | 3e800000 3e800000 | 3e800000 3e800000", ours "after s0 y1: | 3e800000 3e800000 | 00000000 3f800000 | 00000000 3f800000 | 3e800000 3e800000 | 3e800000 3e800000" Metal's fill stores every depth value as given, a denormal included, so sample 0 of texel (1,1) holds 0x00000001 (verified: the carried probe `ms.m` on an M3 Max, macOS 27.0.1, which this case replays). Ours stores 0x00000000: this driver stores a denormal a GPU write gives a `D32_SFLOAT` depth image as a zero and keeps only a CPU store's, which is why it has no `DriverFact::DepthImageKeepsDenormals` (`runtime_lane::depth_denormals`, measured 2026-10-10 on the Radeon 780M and reproduced on the RX 7900 XTX 2026-10-24), and a multisampled image takes no CPU store, so the fill has no exact form on this device. The runtime announces `depth-denormals` for the write, which the case declares at its notices site; the depth words still compare exactly there, which is what this row records. Open: hold a multisampled `Depth32Float` texture's texels in a colour twin, as a read-only depth texture's are already held (`texture.rs`'s depth twin), so no depth image sees the value; on the orchestrator's todo list.
sample-fills-d32-4 RADV divergent case/samples/d32-4 1 line differs: Metal "after s0 y1: | 3e800000 3e800000 3e800000 3e800000 | 00000001 3f800000 00000000 3e800000 | 00000001 3f800000 00000000 3e800000 | 3e800000 3e800000 3e800000 3e800000 | 3e800000 3e800000 3e800000 3e800000", ours "after s0 y1: | 3e800000 3e800000 3e800000 3e800000 | 00000000 3f800000 00000000 3e800000 | 00000000 3f800000 00000000 3e800000 | 3e800000 3e800000 3e800000 3e800000 | 3e800000 3e800000 3e800000 3e800000" Metal's fill stores every depth value as given, a denormal included, so sample 0 of texel (1,1) holds 0x00000001 (verified: the carried probe `ms.m` on an M3 Max, macOS 27.0.1, which this case replays). Ours stores 0x00000000: this driver stores a denormal a GPU write gives a `D32_SFLOAT` depth image as a zero and keeps only a CPU store's, which is why it has no `DriverFact::DepthImageKeepsDenormals` (`runtime_lane::depth_denormals`, measured 2026-10-10 on the Radeon 780M and reproduced on the RX 7900 XTX 2026-10-24), and a multisampled image takes no CPU store, so the fill has no exact form on this device. The runtime announces `depth-denormals` for the write, which the case declares at its notices site; the depth words still compare exactly there, which is what this row records. Open: hold a multisampled `Depth32Float` texture's texels in a colour twin, as a read-only depth texture's are already held (`texture.rs`'s depth twin), so no depth image sees the value; on the orchestrator's todo list.
sample-fills-d32s8-4 RADV divergent case/samples/d32s8-4 1 line differs: Metal "after s0 y1: | 3e800000 3e800000 3e800000 3e800000 | 00000001 3f800000 00000000 3e800000 | 00000001 3f800000 00000000 3e800000 | 3e800000 3e800000 3e800000 3e800000 | 3e800000 3e800000 3e800000 3e800000", ours "after s0 y1: | 3e800000 3e800000 3e800000 3e800000 | 00000000 3f800000 00000000 3e800000 | 00000000 3f800000 00000000 3e800000 | 3e800000 3e800000 3e800000 3e800000 | 3e800000 3e800000 3e800000 3e800000" Metal's fill stores every depth value as given, a denormal included, so sample 0 of texel (1,1) holds 0x00000001 (verified: the carried probe `ms.m` on an M3 Max, macOS 27.0.1, which this case replays). Ours stores 0x00000000: this driver stores a denormal a GPU write gives a `D32_SFLOAT` depth image as a zero and keeps only a CPU store's, which is why it has no `DriverFact::DepthImageKeepsDenormals` (`runtime_lane::depth_denormals`, measured 2026-10-10 on the Radeon 780M and reproduced on the RX 7900 XTX 2026-10-24), and a multisampled image takes no CPU store, so the fill has no exact form on this device. The runtime announces `depth-denormals` for the write, which the case declares at its notices site; the depth words still compare exactly there, which is what this row records. Open: hold a multisampled `Depth32Float` texture's texels in a colour twin, as a read-only depth texture's are already held (`texture.rs`'s depth twin), so no depth image sees the value; on the orchestrator's todo list.
primitive-type-restart-indices llvmpipe (LLVM 23.1.1, 256 bits) divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt16/texels 7 elements differ (U32), the largest difference 65535 Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the same counts on two unrelated drivers -- llvmpipe (LLVM 23.1.1, 256 bits, Mesa 26.2.4) and an RTX 5080 Laptop GPU (615.71.09) -- so it is ours and not one driver's line rasterization; MoltenVK is exact. `primitiveRestartEnable` alone does not explain it: `MTLPrimitiveTypeLine` is a list, where Vulkan's restart bit has no effect and the runtime sets it for strips alone (`metal::state::input_assembly`), and under `MTLIndexTypeUInt32` Vulkan's restart index is 0xFFFFFFFF rather than the case's 65535, so the draw of index 65535 as a vertex is the other candidate -- the runtime's model is that a list draws the all-ones index as a vertex (probed on an M4), and these cells say Metal draws nothing there. The fix belongs in the restart and index-rewrite path (`render/restart.rs`, `index_rewrite.rs`), after reading off a device which of the two the difference follows: clearing the bit for strips alone moves only the `TriangleStrip`/`UInt16` cell (measured on llvmpipe), so these four are the vertex side. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices llvmpipe (LLVM 23.1.1, 256 bits) divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt32/texels 7 elements differ (U32), the largest difference 65535 Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the same counts on two unrelated drivers -- llvmpipe (LLVM 23.1.1, 256 bits, Mesa 26.2.4) and an RTX 5080 Laptop GPU (615.71.09) -- so it is ours and not one driver's line rasterization; MoltenVK is exact. `primitiveRestartEnable` alone does not explain it: `MTLPrimitiveTypeLine` is a list, where Vulkan's restart bit has no effect and the runtime sets it for strips alone (`metal::state::input_assembly`), and under `MTLIndexTypeUInt32` Vulkan's restart index is 0xFFFFFFFF rather than the case's 65535, so the draw of index 65535 as a vertex is the other candidate -- the runtime's model is that a list draws the all-ones index as a vertex (probed on an M4), and these cells say Metal draws nothing there. The fix belongs in the restart and index-rewrite path (`render/restart.rs`, `index_rewrite.rs`), after reading off a device which of the two the difference follows: clearing the bit for strips alone moves only the `TriangleStrip`/`UInt16` cell (measured on llvmpipe), so these four are the vertex side. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices llvmpipe (LLVM 23.1.1, 256 bits) divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt16/texels 5 elements differ (U32), the largest difference 5 Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the same counts on two unrelated drivers -- llvmpipe (LLVM 23.1.1, 256 bits, Mesa 26.2.4) and an RTX 5080 Laptop GPU (615.71.09) -- so it is ours and not one driver's line rasterization; MoltenVK is exact. `primitiveRestartEnable` alone does not explain it: `MTLPrimitiveTypeLine` is a list, where Vulkan's restart bit has no effect and the runtime sets it for strips alone (`metal::state::input_assembly`), and under `MTLIndexTypeUInt32` Vulkan's restart index is 0xFFFFFFFF rather than the case's 65535, so the draw of index 65535 as a vertex is the other candidate -- the runtime's model is that a list draws the all-ones index as a vertex (probed on an M4), and these cells say Metal draws nothing there. The fix belongs in the restart and index-rewrite path (`render/restart.rs`, `index_rewrite.rs`), after reading off a device which of the two the difference follows: clearing the bit for strips alone moves only the `TriangleStrip`/`UInt16` cell (measured on llvmpipe), so these four are the vertex side. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices llvmpipe (LLVM 23.1.1, 256 bits) divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt32/texels 13 elements differ (U32), the largest difference 65535 Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the same counts on two unrelated drivers -- llvmpipe (LLVM 23.1.1, 256 bits, Mesa 26.2.4) and an RTX 5080 Laptop GPU (615.71.09) -- so it is ours and not one driver's line rasterization; MoltenVK is exact. `primitiveRestartEnable` alone does not explain it: `MTLPrimitiveTypeLine` is a list, where Vulkan's restart bit has no effect and the runtime sets it for strips alone (`metal::state::input_assembly`), and under `MTLIndexTypeUInt32` Vulkan's restart index is 0xFFFFFFFF rather than the case's 65535, so the draw of index 65535 as a vertex is the other candidate -- the runtime's model is that a list draws the all-ones index as a vertex (probed on an M4), and these cells say Metal draws nothing there. The fix belongs in the restart and index-rewrite path (`render/restart.rs`, `index_rewrite.rs`), after reading off a device which of the two the difference follows: clearing the bit for strips alone moves only the `TriangleStrip`/`UInt16` cell (measured on llvmpipe), so these four are the vertex side. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt16/texels 7 elements differ (U32), the largest difference 65535 Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the same counts on two unrelated drivers -- llvmpipe (LLVM 23.1.1, 256 bits, Mesa 26.2.4) and an RTX 5080 Laptop GPU (615.71.09) -- so it is ours and not one driver's line rasterization; MoltenVK is exact. `primitiveRestartEnable` alone does not explain it: `MTLPrimitiveTypeLine` is a list, where Vulkan's restart bit has no effect and the runtime sets it for strips alone (`metal::state::input_assembly`), and under `MTLIndexTypeUInt32` Vulkan's restart index is 0xFFFFFFFF rather than the case's 65535, so the draw of index 65535 as a vertex is the other candidate -- the runtime's model is that a list draws the all-ones index as a vertex (probed on an M4), and these cells say Metal draws nothing there. The fix belongs in the restart and index-rewrite path (`render/restart.rs`, `index_rewrite.rs`), after reading off a device which of the two the difference follows: clearing the bit for strips alone moves only the `TriangleStrip`/`UInt16` cell (measured on llvmpipe), so these four are the vertex side. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt32/texels 7 elements differ (U32), the largest difference 65535 Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the same counts on two unrelated drivers -- llvmpipe (LLVM 23.1.1, 256 bits, Mesa 26.2.4) and an RTX 5080 Laptop GPU (615.71.09) -- so it is ours and not one driver's line rasterization; MoltenVK is exact. `primitiveRestartEnable` alone does not explain it: `MTLPrimitiveTypeLine` is a list, where Vulkan's restart bit has no effect and the runtime sets it for strips alone (`metal::state::input_assembly`), and under `MTLIndexTypeUInt32` Vulkan's restart index is 0xFFFFFFFF rather than the case's 65535, so the draw of index 65535 as a vertex is the other candidate -- the runtime's model is that a list draws the all-ones index as a vertex (probed on an M4), and these cells say Metal draws nothing there. The fix belongs in the restart and index-rewrite path (`render/restart.rs`, `index_rewrite.rs`), after reading off a device which of the two the difference follows: clearing the bit for strips alone moves only the `TriangleStrip`/`UInt16` cell (measured on llvmpipe), so these four are the vertex side. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt16/texels 5 elements differ (U32), the largest difference 5 Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the same counts on two unrelated drivers -- llvmpipe (LLVM 23.1.1, 256 bits, Mesa 26.2.4) and an RTX 5080 Laptop GPU (615.71.09) -- so it is ours and not one driver's line rasterization; MoltenVK is exact. `primitiveRestartEnable` alone does not explain it: `MTLPrimitiveTypeLine` is a list, where Vulkan's restart bit has no effect and the runtime sets it for strips alone (`metal::state::input_assembly`), and under `MTLIndexTypeUInt32` Vulkan's restart index is 0xFFFFFFFF rather than the case's 65535, so the draw of index 65535 as a vertex is the other candidate -- the runtime's model is that a list draws the all-ones index as a vertex (probed on an M4), and these cells say Metal draws nothing there. The fix belongs in the restart and index-rewrite path (`render/restart.rs`, `index_rewrite.rs`), after reading off a device which of the two the difference follows: clearing the bit for strips alone moves only the `TriangleStrip`/`UInt16` cell (measured on llvmpipe), so these four are the vertex side. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt32/texels 13 elements differ (U32), the largest difference 65535 Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the same counts on two unrelated drivers -- llvmpipe (LLVM 23.1.1, 256 bits, Mesa 26.2.4) and an RTX 5080 Laptop GPU (615.71.09) -- so it is ours and not one driver's line rasterization; MoltenVK is exact. `primitiveRestartEnable` alone does not explain it: `MTLPrimitiveTypeLine` is a list, where Vulkan's restart bit has no effect and the runtime sets it for strips alone (`metal::state::input_assembly`), and under `MTLIndexTypeUInt32` Vulkan's restart index is 0xFFFFFFFF rather than the case's 65535, so the draw of index 65535 as a vertex is the other candidate -- the runtime's model is that a list draws the all-ones index as a vertex (probed on an M4), and these cells say Metal draws nothing there. The fix belongs in the restart and index-rewrite path (`render/restart.rs`, `index_rewrite.rs`), after reading off a device which of the two the difference follows: clearing the bit for strips alone moves only the `TriangleStrip`/`UInt16` cell (measured on llvmpipe), so these four are the vertex side. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt16/texels 2 elements differ (U32), the largest difference 3 Metal rasterizes a line by the diamond-exit rule and this driver's Bresenham mode breaks one tie the other way. The line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), a vertex of the diamonds of both pixels either side of it: Metal draws the lower pixel (row 1 column 3) and leaves row 0 column 3 at the pass's clear, and this driver draws row 0 column 3 and leaves row 1 column 3. Those two texels, and nothing else, are the whole of each cell's difference -- the mark word alone, since the fragment's vertex id is 0 either way. Vulkan's Bresenham diamond is the open set |p - x| + |q - y| < 0.5, so a line that only touches a vertex exits no diamond and the specification requires no fragment for either pixel; both choices conform, and llvmpipe (LLVM 23.1.1, Mesa 26.2.4) makes Metal's. The runtime already asks every line-rasterizing pipeline for VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT (`pipeline/graphics.rs`), which is what took these four cells from 7, 7, 5 and 13 texels to these two: without it a strictLines device covers the whole rectangle of the line's width. There is no Vulkan control over the tie, so this is the driver's own and not the runtime's. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPrimitiveTypeLine/MTLIndexTypeUInt32/texels 2 elements differ (U32), the largest difference 4 Metal rasterizes a line by the diamond-exit rule and this driver's Bresenham mode breaks one tie the other way. The line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), a vertex of the diamonds of both pixels either side of it: Metal draws the lower pixel (row 1 column 3) and leaves row 0 column 3 at the pass's clear, and this driver draws row 0 column 3 and leaves row 1 column 3. Those two texels, and nothing else, are the whole of each cell's difference -- the mark word alone, since the fragment's vertex id is 0 either way. Vulkan's Bresenham diamond is the open set |p - x| + |q - y| < 0.5, so a line that only touches a vertex exits no diamond and the specification requires no fragment for either pixel; both choices conform, and llvmpipe (LLVM 23.1.1, Mesa 26.2.4) makes Metal's. The runtime already asks every line-rasterizing pipeline for VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT (`pipeline/graphics.rs`), which is what took these four cells from 7, 7, 5 and 13 texels to these two: without it a strictLines device covers the whole rectangle of the line's width. There is no Vulkan control over the tie, so this is the driver's own and not the runtime's. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt16/texels 2 elements differ (U32), the largest difference 5 Metal rasterizes a line by the diamond-exit rule and this driver's Bresenham mode breaks one tie the other way. The line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), a vertex of the diamonds of both pixels either side of it: Metal draws the lower pixel (row 1 column 3) and leaves row 0 column 3 at the pass's clear, and this driver draws row 0 column 3 and leaves row 1 column 3. Those two texels, and nothing else, are the whole of each cell's difference -- the mark word alone, since the fragment's vertex id is 0 either way. Vulkan's Bresenham diamond is the open set |p - x| + |q - y| < 0.5, so a line that only touches a vertex exits no diamond and the specification requires no fragment for either pixel; both choices conform, and llvmpipe (LLVM 23.1.1, Mesa 26.2.4) makes Metal's. The runtime already asks every line-rasterizing pipeline for VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT (`pipeline/graphics.rs`), which is what took these four cells from 7, 7, 5 and 13 texels to these two: without it a strictLines device covers the whole rectangle of the line's width. There is no Vulkan control over the tie, so this is the driver's own and not the runtime's. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
primitive-type-restart-indices NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPrimitiveTypeLineStrip/MTLIndexTypeUInt32/texels 2 elements differ (U32), the largest difference 6 Metal rasterizes a line by the diamond-exit rule and this driver's Bresenham mode breaks one tie the other way. The line of vertices 0 and 1 runs exactly through the boundary point (3.5, 1.0), a vertex of the diamonds of both pixels either side of it: Metal draws the lower pixel (row 1 column 3) and leaves row 0 column 3 at the pass's clear, and this driver draws row 0 column 3 and leaves row 1 column 3. Those two texels, and nothing else, are the whole of each cell's difference -- the mark word alone, since the fragment's vertex id is 0 either way. Vulkan's Bresenham diamond is the open set |p - x| + |q - y| < 0.5, so a line that only touches a vertex exits no diamond and the specification requires no fragment for either pixel; both choices conform, and llvmpipe (LLVM 23.1.1, Mesa 26.2.4) makes Metal's. The runtime already asks every line-rasterizing pipeline for VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT (`pipeline/graphics.rs`), which is what took these four cells from 7, 7, 5 and 13 texels to these two: without it a strictLines device covers the whole rectangle of the line's width. There is no Vulkan control over the tie, so this is the driver's own and not the runtime's. RADV and ANV unrun. docs/FAST-PATHS.md carries the gap.
heap-sizes-block-writes-only NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPixelFormatBGRA8Unorm/Type2D/16x16x1/levels-1/samples-1/slices-1/usage-0x1/private/size-and-align/Ok/align Metal 128 (0x80), ours 1024 (0x400) Plain Metal answers 128 bytes of alignment from `heapTextureSizeAndAlignWithDescriptor:` for every descriptor of this family, and we answer 1024 on this driver -- the image's own alignment raised to at least `bufferImageGranularity` and never narrowed back to Metal's. `Device::heap_texture_size_and_align` answers the device image's own footprint wherever that runs past Metal's modelled answer: `heap_plan` widens the model with the image's `VkMemoryRequirements` (`size: size_and_align.size.max(metal.size)`, `align: size_and_align.align.max(metal.align)`, crates/metal2vulkan-runtime/src/texture/heap.rs), so the number a consumer places textures by is the driver's and not Metal's. A consumer that sizes a heap from Metal's answers and lays its textures out at Metal's offsets UNDER-ALLOCATES here and its placements do not fit. We announce `metal2vulkan-degrade-heap-texture-larger-than-metal` (crates/metal2vulkan-runtime/src/degradation.rs, `HeapTextureLargerThanMetal`, raised by `degrade_past_metal_size` in the same file as the widening), which says outright that the answer is the device's -- but a recording taken on Metal declares nothing about this venue's driver, so the notice justifies no field here, and by the owner's standing rule that we answer what Metal answers the number is the bug. The exact form already exists for one route, and that is the shape of the fix: where a texture is held as a shadow of Metal's tiles in memory of its own (`AliasRoute::Tiled`, `texture/heap_tiled.rs`'s `shadow_tiles` and `tiles_serve`) the call answers Metal's size and alignment exactly, and Metal's own model is already on the public API as `Device::metal_heap_texture_size_and_align`. What is open is to take that route (or that model) for the descriptors this driver's images decline it on, and to decide which of the two calls crates/metal2vulkan-conformance/src/runtime_side.rs asks for this family and the heap-size families beside it. Open: runtime work on the orchestrator's todo list. Measured on NVIDIA GeForce RTX 5080 Laptop GPU, driver 615.71.09, from this run's replay. The coarse alignment is this driver's granularity rather than the model's: llvmpipe answers Metal's 128 for the same descriptors in the same round, and only its sizes move.
heap-sizes-block-writes-only NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPixelFormatBGRA8Unorm/Type2D/16x16x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align/Ok/align Metal 128 (0x80), ours 1024 (0x400) Plain Metal answers 128 bytes of alignment from `heapTextureSizeAndAlignWithDescriptor:` for every descriptor of this family, and we answer 1024 on this driver -- the image's own alignment raised to at least `bufferImageGranularity` and never narrowed back to Metal's. `Device::heap_texture_size_and_align` answers the device image's own footprint wherever that runs past Metal's modelled answer: `heap_plan` widens the model with the image's `VkMemoryRequirements` (`size: size_and_align.size.max(metal.size)`, `align: size_and_align.align.max(metal.align)`, crates/metal2vulkan-runtime/src/texture/heap.rs), so the number a consumer places textures by is the driver's and not Metal's. A consumer that sizes a heap from Metal's answers and lays its textures out at Metal's offsets UNDER-ALLOCATES here and its placements do not fit. We announce `metal2vulkan-degrade-heap-texture-larger-than-metal` (crates/metal2vulkan-runtime/src/degradation.rs, `HeapTextureLargerThanMetal`, raised by `degrade_past_metal_size` in the same file as the widening), which says outright that the answer is the device's -- but a recording taken on Metal declares nothing about this venue's driver, so the notice justifies no field here, and by the owner's standing rule that we answer what Metal answers the number is the bug. The exact form already exists for one route, and that is the shape of the fix: where a texture is held as a shadow of Metal's tiles in memory of its own (`AliasRoute::Tiled`, `texture/heap_tiled.rs`'s `shadow_tiles` and `tiles_serve`) the call answers Metal's size and alignment exactly, and Metal's own model is already on the public API as `Device::metal_heap_texture_size_and_align`. What is open is to take that route (or that model) for the descriptors this driver's images decline it on, and to decide which of the two calls crates/metal2vulkan-conformance/src/runtime_side.rs asks for this family and the heap-size families beside it. Open: runtime work on the orchestrator's todo list. Measured on NVIDIA GeForce RTX 5080 Laptop GPU, driver 615.71.09, from this run's replay. The coarse alignment is this driver's granularity rather than the model's: llvmpipe answers Metal's 128 for the same descriptors in the same round, and only its sizes move.
heap-sizes-block-writes-only NVIDIA GeForce RTX 5080 Laptop GPU divergent case/MTLPixelFormatBGRA8Unorm/Type2D/16x16x1/levels-1/samples-1/slices-1/usage-0x1/shared/size-and-align/Ok/size Metal 1152 (0x480), ours 2048 (0x800) Plain Metal answers a smaller footprint from `heapTextureSizeAndAlignWithDescriptor:` than we do for this descriptor, and the row's two numbers are the pair. `Device::heap_texture_size_and_align` answers the device image's own footprint wherever that runs past Metal's modelled answer: `heap_plan` widens the model with the image's `VkMemoryRequirements` (`size: size_and_align.size.max(metal.size)`, `align: size_and_align.align.max(metal.align)`, crates/metal2vulkan-runtime/src/texture/heap.rs), so the number a consumer places textures by is the driver's and not Metal's. A consumer that sizes a heap from Metal's answers and lays its textures out at Metal's offsets UNDER-ALLOCATES here and its placements do not fit. We announce `metal2vulkan-degrade-heap-texture-larger-than-metal` (crates/metal2vulkan-runtime/src/degradation.rs, `HeapTextureLargerThanMetal`, raised by `degrade_past_metal_size` in the same file as the widening), which says outright that the answer is the device's -- but a recording taken on Metal declares nothing about this venue's driver, so the notice justifies no field here, and by the owner's standing rule that we answer what Metal answers the number is the bug. The exact form already exists for one route, and that is the shape of the fix: where a texture is held as a shadow of Metal's tiles in memory of its own (`AliasRoute::Tiled`, `texture/heap_tiled.rs`'s `shadow_tiles` and `tiles_serve`) the call answers Metal's size and alignment exactly, and Metal's own model is already on the public API as `Device::metal_heap_texture_size_and_align`. What is open is to take that route (or that model) for the descriptors this driver's images decline it on, and to decide which of the two calls crates/metal2vulkan-conformance/src/runtime_side.rs asks for this family and the heap-size families beside it. Open: runtime work on the orchestrator's todo list. Measured on NVIDIA GeForce RTX 5080 Laptop GPU, driver 615.71.09, from this run's replay. The spread this venue shows runs from one 1024-byte granularity page (a 7-level 64x64 RGBA8Unorm private texture: Metal 22528, ours 23552) to a 1D texture laid out as a row of a 2D image (a 5000-texel RGBA8Unorm Type1D: Metal 32768, ours 160768, 4.9 times Metal's) and to eight times Metal's on the smallest 1D and 1D-array textures (Metal 256, ours 2048), so it is not a rounding: a heap sized by Metal's numbers can be short by most of its bytes.
Can't render this file because it is too large.
@@ -86,11 +86,31 @@
//! is no sentinel there. Every `Point`, `Line`, `Triangle` and `LineStrip` cell is untouched by it,
//! the first three because they carry no restart at all. RADV and ANV are unrun.
//!
//! The baseline is not exact at the four `Line` and `LineStrip` cells, and that is **ours**, not one
//! driver's line rasterization: llvmpipe differs by 7, 7, 5 and 13 texels against the M3 Max's
//! recording, and an RTX 5080 Laptop GPU (615.71.09) differs at the same first site, Metal holding
//! the texel clear where we draw there. The falsification above is read against that baseline,
//! which it leaves unmoved; the difference itself is `docs/FAST-PATHS.md`'s known gap.
//! # What the `Line` cells also read: the line rasterization mode
//!
//! The four `Line` and `LineStrip` cells read a second switch of the runtime's beside the restart
//! bit, because every one of them rasterizes lines. Metal covers the pixels whose diamond a line
//! exits, so a line that runs through a pixel boundary covers the one pixel and not the other, and
//! a line's last pixel is the next primitive's first. Vulkan's default mode is the device's own,
//! and a device whose `strictLines` is set covers every pixel inside the rectangle of the line's
//! width instead, which covers both pixels either side of such a boundary and takes the
//! rectangle's own fill rule at the two ends. The runtime asks for Bresenham's mode
//! (`VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT`, `pipeline/graphics.rs`), which is Metal's rule,
//! wherever the device offers it.
//!
//! **That switch is evidenced on llvmpipe too**, which sets `strictLines`: without the mode the
//! four cells differ from the recording by 7, 7, 5 and 13 texels, each first at
//! `[image 0, row 0, 12]` — the texel at row 0 column 3, where the line of vertices 0 and 1 runs
//! exactly through the boundary point (3.5, 1.0), Metal draws the lower pixel alone and the
//! rectangle covers both. With it every texel of the ten cells is Metal's on llvmpipe, and on an
//! RTX 5080 Laptop GPU (615.71.09), which sets `strictLines` and differed by the same four counts,
//! the four cells fall to **two** texels each: that one boundary point, where the driver draws the
//! upper pixel and Metal the lower. Vulkan's Bresenham diamond is open
//! (`|p - x| + |q - y| < 0.5`), so a line that only touches a diamond vertex exits no diamond and
//! neither pixel is required of a conforming driver; the two make opposite choices and no Vulkan
//! control decides it, which is why the cells' remaining `known-gaps.tsv` rows are the driver's
//! own. MoltenVK leaves `strictLines` clear and its lines are Metal's own, which is why no Metal
//! venue could read this switch either.
//!
//! # Nothing here can fault a GPU
//!
@@ -371,6 +371,8 @@ pub(super) enum Structure {
ListRestart,
/// `VkPhysicalDeviceProvokingVertexFeaturesEXT`.
ProvokingVertex,
/// `VkPhysicalDeviceLineRasterizationFeaturesEXT`.
LineRasterization,
RayQuery,
Acceleration,
/// `VkPhysicalDeviceMeshShaderFeaturesEXT`.
@@ -467,6 +469,7 @@ impl Structure {
| Structure::DepthClampControl
| Structure::ListRestart
| Structure::ProvokingVertex
| Structure::LineRasterization
| Structure::RayQuery
| Structure::Acceleration
| Structure::MeshShader
@@ -520,6 +523,7 @@ impl Structure {
Structure::DepthClampControl => &[X::ExtDepthClampControl],
Structure::ListRestart => &[X::ExtPrimitiveTopologyListRestart],
Structure::ProvokingVertex => &[X::ExtProvokingVertex],
Structure::LineRasterization => &[X::ExtLineRasterization],
Structure::RayQuery => &[X::KhrRayQuery],
Structure::Acceleration => &[X::KhrAccelerationStructure],
Structure::MeshShader => &[X::ExtMeshShader],
@@ -581,6 +585,7 @@ struct FeatureChain {
depth_clamp_control: DepthClampControlFeatures,
list_restart: vk::PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT<'static>,
provoking_vertex: vk::PhysicalDeviceProvokingVertexFeaturesEXT<'static>,
line_rasterization: vk::PhysicalDeviceLineRasterizationFeaturesEXT<'static>,
ray_query: vk::PhysicalDeviceRayQueryFeaturesKHR<'static>,
acceleration_structure: vk::PhysicalDeviceAccelerationStructureFeaturesKHR<'static>,
mesh_shader: vk::PhysicalDeviceMeshShaderFeaturesEXT<'static>,
@@ -772,6 +777,7 @@ members! {
ListRestart.list_restart.primitive_topology_list_restart => PrimitiveTopologyListRestart;
ListRestart.list_restart.primitive_topology_patch_list_restart => PrimitiveTopologyPatchListRestart;
ProvokingVertex.provoking_vertex.provoking_vertex_last => ProvokingVertexLast;
LineRasterization.line_rasterization.bresenham_lines => BresenhamLines;
RayQuery.ray_query.ray_query => RayQuery;
Acceleration.acceleration_structure.acceleration_structure => AccelerationStructure;
MeshShader.mesh_shader.task_shader => TaskShader;
@@ -903,6 +909,7 @@ const EXTENSIONS: &[(VkExtension, &CStr)] = {
c"VK_EXT_primitive_topology_list_restart",
),
(X::ExtProvokingVertex, c"VK_EXT_provoking_vertex"),
(X::ExtLineRasterization, c"VK_EXT_line_rasterization"),
(X::KhrRayQuery, c"VK_KHR_ray_query"),
(
X::KhrAccelerationStructure,
@@ -1096,6 +1103,7 @@ macro_rules! link_extensions {
DepthClampControl => depth_clamp_control,
ListRestart => list_restart,
ProvokingVertex => provoking_vertex,
LineRasterization => line_rasterization,
RayQuery => ray_query,
Acceleration => acceleration_structure,
MeshShader => mesh_shader,
@@ -121,6 +121,23 @@ pub(crate) fn keyed_assembly(
(topology, primitive_restart)
}
/// Whether a pipeline of `topology` and `polygon_mode` rasterizes lines: a line topology, or a
/// triangle topology whose fill mode draws each triangle's edges as lines
/// (`MTLTriangleFillModeLines`). A pipeline whose topology is dynamic takes its class's own
/// topology here ([`input_assembly`]), and Vulkan holds a dynamic topology to its class, so a line
/// pipeline stays one.
///
/// [`input_assembly`]: metal2vulkan::metal::state::input_assembly
fn rasterizes_lines(topology: vk::PrimitiveTopology, polygon_mode: vk::PolygonMode) -> bool {
matches!(
topology,
vk::PrimitiveTopology::LINE_LIST
| vk::PrimitiveTopology::LINE_STRIP
| vk::PrimitiveTopology::LINE_LIST_WITH_ADJACENCY
| vk::PrimitiveTopology::LINE_STRIP_WITH_ADJACENCY
) || polygon_mode == vk::PolygonMode::LINE
}
/// The topology a graphics making's record is named by (`shader_cache/driver.rs`): a line
/// topology names it as the triangle topology of its shape, so a state's line and triangle
/// pipelines of an otherwise equal key share one record; every other topology names its own.
@@ -306,6 +323,12 @@ pub(crate) struct GraphicsContent {
polygon_mode: vk::PolygonMode,
/// The last vertex provokes ([`FixedState::provoking_last`]).
provoking_last: bool,
/// The device rasterizes lines as Metal does on request ([`bresenham_lines`]): a pipeline
/// that rasterizes lines chains `VkPipelineRasterizationLineStateCreateInfoEXT` with
/// `VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT`.
///
/// [`bresenham_lines`]: metal2vulkan::device::VkFeature::BresenhamLines
bresenham_lines: bool,
cull_mode: vk::CullModeFlags,
front_face: vk::FrontFace,
depth_bias: bool,
@@ -671,6 +694,23 @@ impl GraphicsContent {
if self.provoking_last {
raster = raster.push_next(&mut provoking);
}
// Metal covers the pixels whose diamond a line exits. Vulkan's default mode is the
// device's own: on a device whose `strictLines` is set it is the rectangle of the line's
// width, which covers both pixels either side of a pixel boundary the line runs along and
// takes the rectangle's own fill rule at the ends, so a line's first and last pixels and
// every boundary pixel differ from Metal's (measured on llvmpipe and on an RTX 5080,
// which both set it; MoltenVK does not, and its lines are Metal's own). Bresenham's mode
// is Metal's rule, and every device profile this tree holds offers it.
let mut line = vk::PipelineRasterizationLineStateCreateInfoEXT::default()
.line_rasterization_mode(vk::LineRasterizationModeEXT::BRESENHAM);
let multisample_allows_bresenham =
!self.alpha_to_coverage && !self.alpha_to_one && !self.sample_shading;
if self.bresenham_lines
&& multisample_allows_bresenham
&& rasterizes_lines(self.topology, self.polygon_mode)
{
raster = raster.push_next(&mut line);
}
// The pass's sample positions on a grid of one pixel, each already on the sixteenths
// every device with the extension takes exactly (`sample_positions.rs`).
let mut sample_locations = vk::PipelineSampleLocationsStateCreateInfoEXT::default()
@@ -959,6 +999,13 @@ impl VariantObjects {
depth_clamp: key.fixed.depth_clamp,
polygon_mode: key.fixed.polygon_mode.into(),
provoking_last: key.fixed.provoking_last,
bresenham_lines: self
.device
.compile_device()
.profile()
.enabled()
.features
.contains(&metal2vulkan::device::VkFeature::BresenhamLines),
cull_mode: key.fixed.cull_mode.into(),
front_face: key.fixed.front_face.into(),
depth_bias: bias.enable,
@@ -320,6 +320,7 @@ struct FeatureChain {
depth_clamp_control: DepthClampControlFeatures,
list_restart: avk::PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT<'static>,
provoking_vertex: avk::PhysicalDeviceProvokingVertexFeaturesEXT<'static>,
line_rasterization: avk::PhysicalDeviceLineRasterizationFeaturesEXT<'static>,
ray_query: avk::PhysicalDeviceRayQueryFeaturesKHR<'static>,
acceleration_structure: avk::PhysicalDeviceAccelerationStructureFeaturesKHR<'static>,
portability_subset: avk::PhysicalDevicePortabilitySubsetFeaturesKHR<'static>,
@@ -371,6 +372,7 @@ const EXT_DEPTH_CLIP_ENABLE: &[&str] = &["VK_EXT_depth_clip_enable"];
const EXT_DEPTH_CLAMP_CONTROL: &[&str] = &["VK_EXT_depth_clamp_control"];
const EXT_LIST_RESTART: &[&str] = &["VK_EXT_primitive_topology_list_restart"];
const EXT_PROVOKING_VERTEX: &[&str] = &["VK_EXT_provoking_vertex"];
const EXT_LINE_RASTERIZATION: &[&str] = &["VK_EXT_line_rasterization", "VK_KHR_line_rasterization"];
const EXT_SAMPLE_LOCATIONS: &[&str] = &["VK_EXT_sample_locations"];
const EXT_RAY_QUERY: &[&str] = &["VK_KHR_ray_query"];
const EXT_ACCELERATION_STRUCTURE: &[&str] = &["VK_KHR_acceleration_structure"];
@@ -417,6 +419,7 @@ pub(crate) struct Chained {
depth_clamp_control: bool,
list_restart: bool,
provoking_vertex: bool,
line_rasterization: bool,
ray_query: bool,
acceleration_structure: bool,
portability_subset: bool,
@@ -466,6 +469,7 @@ impl Chained {
depth_clamp_control: x.ext(EXT_DEPTH_CLAMP_CONTROL),
list_restart: x.ext(EXT_LIST_RESTART),
provoking_vertex: x.ext(EXT_PROVOKING_VERTEX),
line_rasterization: x.ext(EXT_LINE_RASTERIZATION),
ray_query: x.ext(EXT_RAY_QUERY),
acceleration_structure: x.ext(EXT_ACCELERATION_STRUCTURE),
portability_subset: x.ext(EXT_PORTABILITY_SUBSET),
@@ -535,6 +539,7 @@ impl FeatureChain {
depth_clamp_control,
list_restart,
provoking_vertex,
line_rasterization,
ray_query,
acceleration_structure,
portability_subset,
@@ -766,6 +771,7 @@ feature_sources! { c, x;
PrimitiveTopologyPatchListRestart =>
on(c.list_restart.primitive_topology_patch_list_restart);
ProvokingVertexLast => on(c.provoking_vertex.provoking_vertex_last);
BresenhamLines => on(c.line_rasterization.bresenham_lines);
RayQuery => on(c.ray_query.ray_query);
AccelerationStructure => on(c.acceleration_structure.acceleration_structure);
ConstantAlphaColorBlendFactors =>
@@ -164,6 +164,7 @@ fn feature_struct_size(ty: avk::StructureType) -> usize {
DepthClampControlFeatures,
avk::PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT<'static>,
avk::PhysicalDeviceProvokingVertexFeaturesEXT<'static>,
avk::PhysicalDeviceLineRasterizationFeaturesEXT<'static>,
avk::PhysicalDeviceRayQueryFeaturesKHR<'static>,
avk::PhysicalDeviceMeshShaderFeaturesEXT<'static>,
avk::PhysicalDeviceAccelerationStructureFeaturesKHR<'static>,
@@ -456,6 +457,7 @@ const EVERY_EXTENSION: &[&CStr] = &[
c"VK_EXT_depth_clamp_control",
c"VK_EXT_primitive_topology_list_restart",
c"VK_EXT_provoking_vertex",
c"VK_EXT_line_rasterization",
c"VK_EXT_sample_locations",
c"VK_KHR_ray_query",
c"VK_KHR_acceleration_structure",
+2
View File
@@ -932,6 +932,7 @@ codec_enum! {
ShaderFmaFloat16,
ProvokingVertexLast, LogicOp, DrawIndirectCount,
AlphaToOne,
BresenhamLines,
}
VkExtension {
ExtRobustness2, ExtImageRobustness, ExtShaderAtomicFloat, ExtShaderAtomicFloat2,
@@ -957,6 +958,7 @@ codec_enum! {
ExtAttachmentFeedbackLoopLayout, ExtExtendedDynamicState3,
KhrFormatFeatureFlags2,
ExtProvokingVertex, ExtPostDepthCoverage,
ExtLineRasterization,
}
SubgroupOp { Basic, Vote, Arithmetic, Ballot, Shuffle, ShuffleRelative, Clustered, Quad }
FloatWidth { F16, F32, F64 }
+1 -1
View File
@@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 447;
/// changes no behaviour, and then updates that hash alone with the commit saying why, or changes
/// behaviour and also bumps this version. The commit that bumps it says what changed; this comment
/// keeps no history.
pub const RUNTIME_VERSION: u32 = 1538;
pub const RUNTIME_VERSION: u32 = 1539;
/// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex,
/// of the manifest, the build script, and exactly the files the crate roots' module tree compiles
@@ -296,6 +296,7 @@ exposures! {
PrimitiveTopologyListRestart, PrimitiveTopologyPatchListRestart,
];
Extension(&[E::ExtProvokingVertex]) => [ProvokingVertexLast];
Extension(&[E::ExtLineRasterization]) => [BresenhamLines];
Extension(&[E::KhrRayQuery]) => [RayQuery];
Extension(&[E::ExtMeshShader]) => [TaskShader, MeshShader];
Extension(&[E::KhrAccelerationStructure]) => [AccelerationStructure];
@@ -353,6 +354,7 @@ fn facts(ext: VkExtension) -> ExtensionFacts {
| E::ExtSampleLocations
| E::ExtPrimitiveTopologyListRestart
| E::ExtProvokingVertex
| E::ExtLineRasterization
| E::ExtAttachmentFeedbackLoopLayout
| E::ExtExtendedDynamicState3
| E::ExtPostDepthCoverage
@@ -1276,6 +1276,11 @@ fn feature_route(structure: &str) -> Option<Route> {
Ext(&["VK_EXT_primitive_topology_list_restart"], None)
}
"VkPhysicalDeviceProvokingVertexFeaturesEXT" => Ext(&["VK_EXT_provoking_vertex"], None),
"VkPhysicalDeviceLineRasterizationFeaturesEXT"
| "VkPhysicalDeviceLineRasterizationFeaturesKHR" => Ext(
&["VK_EXT_line_rasterization", "VK_KHR_line_rasterization"],
None,
),
"VkPhysicalDeviceRayQueryFeaturesKHR" => Ext(&["VK_KHR_ray_query"], None),
"VkPhysicalDeviceAccelerationStructureFeaturesKHR" => {
Ext(&["VK_KHR_acceleration_structure"], None)
@@ -1668,6 +1673,7 @@ pub(super) const FEATURE_MEMBERS: &[(&str, VkFeature)] = {
F::PrimitiveTopologyPatchListRestart,
),
("provokingVertexLast", F::ProvokingVertexLast),
("bresenhamLines", F::BresenhamLines),
("alphaToOne", F::AlphaToOne),
]
};
@@ -1735,6 +1741,7 @@ pub(crate) fn extension_from_name(name: &str) -> Option<VkExtension> {
"VK_EXT_sample_locations" => E::ExtSampleLocations,
"VK_EXT_primitive_topology_list_restart" => E::ExtPrimitiveTopologyListRestart,
"VK_EXT_provoking_vertex" => E::ExtProvokingVertex,
"VK_EXT_line_rasterization" | "VK_KHR_line_rasterization" => E::ExtLineRasterization,
"VK_KHR_synchronization2" => E::KhrSynchronization2,
"VK_KHR_shader_untyped_pointers" => E::KhrShaderUntypedPointers,
"VK_KHR_cooperative_matrix" => E::KhrCooperativeMatrix,
@@ -342,6 +342,16 @@ pub enum VkFeature {
/// (`VUID-VkPipelineMultisampleStateCreateInfo-alphaToOneEnable-00785`). A render pipeline
/// whose descriptor sets `alphaToOneEnabled` requires it (`GraphicsState::alpha_to_one`).
AlphaToOne,
// Appended.
/// `VK_EXT_line_rasterization`'s `bresenhamLines`: a pipeline whose rasterization state chains
/// `VkPipelineRasterizationLineStateCreateInfoEXT` with
/// `VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT`
/// (`VUID-VkPipelineRasterizationLineStateCreateInfoKHR-lineRasterizationMode-02768`), under
/// which a line covers the pixels whose diamond it exits, as Metal rasterizes a line. Without
/// it a line takes the device's own default mode, which on a device whose `strictLines` is set
/// covers every pixel the line's rectangle contains and so covers pixels Metal leaves
/// untouched (`pipeline/graphics.rs`).
BresenhamLines,
}
/// A Vulkan device extension the new core can require.
@@ -460,6 +470,10 @@ pub enum VkExtension {
/// `VK_EXT_post_depth_coverage` (never promoted, no feature member): a fragment shader's
/// `SampleMask` input read after the early depth and stencil tests (`PostDepthCoverage`).
ExtPostDepthCoverage,
// Appended.
/// `VK_EXT_line_rasterization` (promoted to `VK_KHR_line_rasterization`, never core):
/// [`VkFeature::BresenhamLines`].
ExtLineRasterization,
}
/// One subgroup operation class (`VkSubgroupFeatureFlagBits`).
+5 -9
View File
@@ -43,7 +43,7 @@ Its limits, measured rather than asserted:
| committed recordings | 1100 |
| distinct SDK items the Metal leg reaches, of any status | 797 |
| of those, reached only where this cannot name the family | 7 |
| ledger rows (a case whose gap is recorded) | 813 |
| ledger rows (a case whose gap is recorded) | 809 |
| declared crossings of the option space (pairs put to Metal at once) | 24 |
| declared crossings that are no pair of it (a boolean or numeric field, or one type in two slots) | 30 |
@@ -2299,14 +2299,10 @@ A case whose difference from Metal is recorded rather than compared away. The le
| `sample-fills-d32-2` | Metal's fill stores every depth value as given, a denormal included, so sample 0 of texel (1,1) holds 0x00000001 (verified: the carried probe `ms.m` on an M3 Ma… |
| `sample-fills-d32-4` | Metal's fill stores every depth value as given, a denormal included, so sample 0 of texel (1,1) holds 0x00000001 (verified: the carried probe `ms.m` on an M3 Ma… |
| `sample-fills-d32s8-4` | Metal's fill stores every depth value as given, a denormal included, so sample 0 of texel (1,1) holds 0x00000001 (verified: the carried probe `ms.m` on an M3 Ma… |
| `primitive-type-restart-indices` | Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the sa… |
| `primitive-type-restart-indices` | Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the sa… |
| `primitive-type-restart-indices` | Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the sa… |
| `primitive-type-restart-indices` | Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the sa… |
| `primitive-type-restart-indices` | Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the sa… |
| `primitive-type-restart-indices` | Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the sa… |
| `primitive-type-restart-indices` | Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the sa… |
| `primitive-type-restart-indices` | Metal leaves these texels at the pass's clear and we draw a fragment there. All four `Line` and `LineStrip` cells differ from the M3 Max's recording with the sa… |
| `primitive-type-restart-indices` | Metal rasterizes a line by the diamond-exit rule and this driver's Bresenham mode breaks one tie the other way. The line of vertices 0 and 1 runs exactly throug… |
| `primitive-type-restart-indices` | Metal rasterizes a line by the diamond-exit rule and this driver's Bresenham mode breaks one tie the other way. The line of vertices 0 and 1 runs exactly throug… |
| `primitive-type-restart-indices` | Metal rasterizes a line by the diamond-exit rule and this driver's Bresenham mode breaks one tie the other way. The line of vertices 0 and 1 runs exactly throug… |
| `primitive-type-restart-indices` | Metal rasterizes a line by the diamond-exit rule and this driver's Bresenham mode breaks one tie the other way. The line of vertices 0 and 1 runs exactly throug… |
| `heap-sizes-block-writes-only` | Plain Metal answers 128 bytes of alignment from `heapTextureSizeAndAlignWithDescriptor:` for every descriptor of this family, and we answer 1024 on this driver … |
| `heap-sizes-block-writes-only` | Plain Metal answers 128 bytes of alignment from `heapTextureSizeAndAlignWithDescriptor:` for every descriptor of this family, and we answer 1024 on this driver … |
| `heap-sizes-block-writes-only` | Plain Metal answers a smaller footprint from `heapTextureSizeAndAlignWithDescriptor:` than we do for this descriptor, and the row's two numbers are the pair. `D… |
+8 -9
View File
@@ -717,15 +717,14 @@ driver's. Each is open work.
than a fix. The largest, 64 codes at `blended/sas-1msa`, is **too large for rounding** and is a
separate open question.
- **A line's first texels where Metal draws nothing** (`primitive-type-restart-indices`): all four
`Line` and `LineStrip` cells differ from the M3 Max's recording on llvmpipe (7, 7, 5 and 13
texels) and on an RTX 5080 Laptop GPU (615.71.09) at the same first site, `[image 0, row 0, 12]`,
where Metal leaves the texel clear and this draws there (3 at `Line`/`UInt16`, 4 at
`Line`/`UInt32`, 5 and 6 at the `LineStrip` pair). Two unrelated drivers answering the same thing
makes it ours rather than one rasterizer's. `primitiveRestartEnable` does not explain it:
`MTLPrimitiveTypeLine` is a list, where Vulkan's restart bit has no effect, and under `UInt32`
Vulkan's restart index is `0xFFFFFFFF` rather than the case's 65535 — an out-of-range fetch of
index 65535 is the other candidate. RADV and ANV unrun.
- **One line texel at a diamond vertex on the RTX 5080** (`primitive-type-restart-indices`): all
four `Line` and `LineStrip` cells differ from the M3 Max's recording by two texels on an RTX 5080
Laptop GPU (615.71.09), and by none on llvmpipe (LLVM 23.1.1, 256 bits). The line of vertices 0
and 1 runs exactly through (3.5, 1.0), a vertex of the diamonds of the two pixels either side of
it: Metal draws the lower one and this driver draws the upper one. Vulkan's Bresenham diamond is
open (`|p - x| + |q - y| < 0.5`), so a line that only touches a vertex exits no diamond and
neither pixel is required; both choices conform and there is no Vulkan control over the tie, so
this is the driver's and not ours. RADV and ANV unrun.
- **A heap texture at an offset below the device's own alignment on Navi31**: `new_texture_at_offset`
answers nil at offset 327680, two and a half times the 128 KiB a Navi31 depth image wants
+9 -9
View File
@@ -14,7 +14,7 @@ Columns:
- `none`: no public API path: malformed or non-Metal input, Apple-private calls, or a cap no valid program of ordinary size meets;
- `?`: not assessed yet.
Generated at `c86db6375`.
Generated at `fec029e47`.
## Totals
@@ -107,7 +107,7 @@ Generated at `c86db6375`.
| `Tensors` | | every device (not implemented) | 2: `crates/metal2vulkan-air/src/canon/matmul2d/synth.rs:32`, `crates/metal2vulkan/src/lower/select.rs:903` | `rare`: shader tensors |
| `RasterizationRateMap` | | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/fragment/mod.rs:952` | `rare`: rasterization rate maps |
| `GpuEncodedIndirectCommands` | | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism); every device (not implemented) | 17: `crates/metal2vulkan/src/bind/replay.rs:556`, `crates/metal2vulkan/src/bind/replay.rs:796` (+15) | `rare`: indirect command buffers encoded by a kernel |
| `VulkanVersion` | The device's Vulkan version is below the 1.2 floor | devices without ApiVersion::V1_2 | 2: `crates/metal2vulkan/src/ash_interop/query.rs:928`, `crates/metal2vulkan/src/device/derive.rs:105` | `none`: a device below Vulkan 1.2 |
| `VulkanVersion` | The device's Vulkan version is below the 1.2 floor | devices without ApiVersion::V1_2 | 2: `crates/metal2vulkan/src/ash_interop/query.rs:934`, `crates/metal2vulkan/src/device/derive.rs:105` | `none`: a device below Vulkan 1.2 |
| `Constant` | A bitcode constant record outside the typed model (block address, inline asm, `select` and other constant expressions the IR has no form for) | - | via a helper: 3: `crates/metal2vulkan-air/src/bitcode/constants.rs:210`, `crates/metal2vulkan-air/src/bitcode/constants.rs:268` (+1) | `none`: LLVM constant forms AIR does not emit |
| `Attribute` | An LLVM attribute kind that changes the calling ABI and that AIR does not use (`inalloca`, `preallocated`, `byref`, `nest`, the `swift*` kinds) | - | via a helper: 2: `crates/metal2vulkan-air/src/bitcode/attrs.rs:493`, `crates/metal2vulkan/src/error/mod.rs:257` | `none`: LLVM ABI attributes AIR does not use |
| `BitcodeRecord` | A bitcode record LLVM defines in `block` that the typed model does not cover and that has no more specific variant (legacy spellings predating... | - | via a helper: 7: `crates/metal2vulkan-air/src/bitcode/attrs.rs:337`, `crates/metal2vulkan-air/src/bitcode/function.rs:572` (+5) | `none`: bitcode records AIR does not emit |
@@ -177,8 +177,8 @@ Generated at `c86db6375`.
| `CommandReplay` | The device replay of indirect command buffers | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/binding.rs:723`, `crates/metal2vulkan-runtime/src/binding.rs:726` | `rare`: the device replay of indirect command buffers |
| `RenderAttachments` | Render attachments and their binding forms | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1794` | `rare`: render attachment forms not built |
| `AccelerationStructures` | Acceleration structures | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1797` | `rare`: ray tracing (out of scope by ruling) |
| `FeatureEnable` | A feature a created device would enable that the runtime's feature chain has no member for, or whose structure no enabled extension exposes | devices without the feature or extension it names | 1: `crates/metal2vulkan-runtime/src/enables.rs:1167` | `none`: device creation with a feature the runtime's chain lacks |
| `ExtensionEnable` | An extension a created device would enable that the device lists under none of the names the runtime knows for it | devices without the feature or extension it names | 1: `crates/metal2vulkan-runtime/src/enables.rs:1158` | `none`: device creation with an extension under an unknown name |
| `FeatureEnable` | A feature a created device would enable that the runtime's feature chain has no member for, or whose structure no enabled extension exposes | devices without the feature or extension it names | 1: `crates/metal2vulkan-runtime/src/enables.rs:1175` | `none`: device creation with a feature the runtime's chain lacks |
| `ExtensionEnable` | An extension a created device would enable that the device lists under none of the names the runtime knows for it | devices without the feature or extension it names | 1: `crates/metal2vulkan-runtime/src/enables.rs:1166` | `none`: device creation with an extension under an unknown name |
| `Render` | Render pipelines, passes and draws | every device (runtime piece not built) | 23: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404`, `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:461` (+21) | `system`: render pass, resolve and attachment forms not built (20 sites: see the appendix) |
| `TexelsPastBufferLength` | A 2D array over a buffer whose texels run past the buffer's length, which Metal makes over bytes its buffer's allocation has past the length, or a... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/buffer_texture.rs:260`, `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105` | `rare`: a 2D array over a buffer past its length |
| `OverlappingSurfaceRows` | A texture of an IOSurface plane (`Buffer::new_texture_with_iosurface_plane`, the stand-in for `newTextureWithDescriptor:iosurface:plane:`) whose... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/buffer_texture.rs:262` | `rare`: an IOSurface plane whose rows overlap |
@@ -213,7 +213,7 @@ Generated at `c86db6375`.
| `VertexFetchPast4GiB` | A draw (`drawPrimitives:` and its forms, or an indirect command buffer's command) that may read a vertex attribute the pipeline fetches in its... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/vertex_reach.rs:72` | `rare`: vertex fetch past 4 GiB of a bind offset |
| `StageInFetchPast4GiB` | A dispatch (`dispatchThreads:threadsPerThreadgroup:` and its forms, or an indirect command buffer's command) whose kernel may read a... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/fetch_reach.rs:126` | `rare`: stage-in fetch past 4 GiB of a bind offset |
| `MappedTextureSampling` | A command that would sample a texture of an address-mode map (`TextureDescriptor::address_mode_map`) where the runtime cannot map it at bind... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/address_map.rs:158` | `none`: a runtime extension's texture (address_mode_map) sampled where the runtime cannot map it; no Metal API path |
| `LibrarySource` | A library compiled from Metal Shading Language source | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/library.rs:108` | `app`: a library compiled from Metal source (newLibraryWithSource:); the runtime takes metallibs and AIR |
| `LibrarySource` | A library compiled from Metal Shading Language source | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/library.rs:135` | `app`: a library compiled from Metal source (newLibraryWithSource:); the runtime takes metallibs and AIR |
| `RestartedStrip` | An indexed strip after `set_primitive_restart_enabled` with an index Vulkan does not restart at, which the runtime draws as a list an index... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/restart.rs:71` | `none`: a strip after the Apple-private setPrimitiveRestartEnabled:index: whose rewrite pass cannot run as Metal draws |
| `PrivatePrimitives` | A draw of one of Metal's private primitive types (`DrawPrimitiveType` | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:8174`, `crates/metal2vulkan-runtime/src/render/restart.rs:72` | `none`: a draw of an Apple-private primitive type (OpenGL on Metal's quads and kin) whose list cannot draw as Metal draws: a list past a u32 or one storage range, indices or arguments an unordered earlier draw wrote |
| `ProvokingVertex` | A draw under Apple's last provoking vertex (`setProvokingVertexMode:` 1) on a device without `VK_EXT_provoking_vertex`'s last vertex, which the... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/restart.rs:73` | `none`: a draw after the Apple-private setProvokingVertexMode: 1, on a device without the last provoking vertex, whose rotated list cannot draw as Metal draws |
@@ -366,7 +366,7 @@ Each refusal's sites, with the function that builds it.
- `feature::Tensors`: `crates/metal2vulkan-air/src/canon/matmul2d/synth.rs:32 (refuse)`; `crates/metal2vulkan/src/lower/select.rs:903 (route_air)`
- `feature::RasterizationRateMap`: `crates/metal2vulkan/src/lower/fragment/mod.rs:952 (select)`
- `feature::GpuEncodedIndirectCommands`: `crates/metal2vulkan/src/bind/replay.rs:556 (preprocess)`; `crates/metal2vulkan/src/bind/replay.rs:796 (replay_preprocess_module)`; `crates/metal2vulkan/src/bind/replay/draws.rs:280 (draw_replay_preprocess)`; `crates/metal2vulkan/src/bind/replay/draws.rs:482 (draw_replay_module)`; `crates/metal2vulkan/src/bind/replay/flat.rs:247 (flat_dispatch_module)`; `crates/metal2vulkan/src/bind/replay/merged.rs:242 (draw_merge_module)`; `crates/metal2vulkan/src/lower/access/encode.rs:394 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:410 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:527 (select_command)`; `crates/metal2vulkan/src/lower/access/mod.rs:1540 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1566 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1569 (plan_replay)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2707 (merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2763 (finish_merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:458 (param)`; `crates/metal2vulkan/src/pipeline/compile.rs:2173 (plan_one)`; `crates/metal2vulkan/src/pipeline/compile.rs:2178 (plan_one)`
- `feature::VulkanVersion`: `crates/metal2vulkan/src/ash_interop/query.rs:928 (query)`; `crates/metal2vulkan/src/device/derive.rs:105 (with_deviations)`
- `feature::VulkanVersion`: `crates/metal2vulkan/src/ash_interop/query.rs:934 (query)`; `crates/metal2vulkan/src/device/derive.rs:105 (with_deviations)`
- `feature::Constant`: `crates/metal2vulkan-air/src/bitcode/constants.rs:210 (record)`; `crates/metal2vulkan-air/src/bitcode/constants.rs:268 (record)`; `crates/metal2vulkan/src/error/mod.rs:256 (from)`
- `feature::Attribute`: `crates/metal2vulkan-air/src/bitcode/attrs.rs:493 (known)`; `crates/metal2vulkan/src/error/mod.rs:257 (from)`
- `feature::BitcodeRecord`: `crates/metal2vulkan-air/src/bitcode/attrs.rs:337 (decode_lists)`; `crates/metal2vulkan-air/src/bitcode/function.rs:572 (symtab)`; `crates/metal2vulkan-air/src/bitcode/metadata.rs:130 (decode)`; `crates/metal2vulkan-air/src/bitcode/metadata.rs:157 (decode)`; `crates/metal2vulkan-air/src/bitcode/module.rs:727 (check_bodies)`; `crates/metal2vulkan-air/src/bitcode/module.rs:872 (symtab)`; `crates/metal2vulkan/src/error/mod.rs:258 (from)`
@@ -431,8 +431,8 @@ Each refusal's sites, with the function that builds it.
- `gap::CommandReplay`: `crates/metal2vulkan-runtime/src/binding.rs:723 (bind_into)`; `crates/metal2vulkan-runtime/src/binding.rs:726 (bind_into)`
- `gap::RenderAttachments`: `crates/metal2vulkan-runtime/src/binding.rs:1794 (unexpected)`
- `gap::AccelerationStructures`: `crates/metal2vulkan-runtime/src/binding.rs:1797 (unexpected)`
- `gap::FeatureEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1167 (of)`
- `gap::ExtensionEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1158 (of)`
- `gap::FeatureEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1175 (of)`
- `gap::ExtensionEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1166 (of)`
- `gap::Render`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:461 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:685 (check_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:840 (attachment_twin)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:283 (check_sizes)`; `crates/metal2vulkan-runtime/src/kept_bytes.rs:138 (settle)`; `crates/metal2vulkan-runtime/src/linear_attachment.rs:293 (settle)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:204 (plan)`; `crates/metal2vulkan-runtime/src/pipeline/render.rs:1181 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:2251 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:6001 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7973 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:516 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1317 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1679 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1733 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1794 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:2027 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:1039 (attach)`; `crates/metal2vulkan-runtime/src/resolve.rs:1107 (color_copy)`; `crates/metal2vulkan-runtime/src/resolve.rs:1154 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1171 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1236 (destination)`
- `gap::TexelsPastBufferLength`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:260 (refusal_error)`; `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105 (surface_depth_twin)`
- `gap::OverlappingSurfaceRows`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:262 (refusal_error)`
@@ -467,7 +467,7 @@ Each refusal's sites, with the function that builds it.
- `gap::VertexFetchPast4GiB`: `crates/metal2vulkan-runtime/src/render/vertex_reach.rs:72 (check_vertex_reach)`
- `gap::StageInFetchPast4GiB`: `crates/metal2vulkan-runtime/src/fetch_reach.rs:126 (check_stage_in_reach)`
- `gap::MappedTextureSampling`: `crates/metal2vulkan-runtime/src/address_map.rs:158 (resolve)`
- `gap::LibrarySource`: `crates/metal2vulkan-runtime/src/library.rs:108 (new_library_with_source)`
- `gap::LibrarySource`: `crates/metal2vulkan-runtime/src/library.rs:135 (new_library_with_source)`
- `gap::RestartedStrip`: `crates/metal2vulkan-runtime/src/render/restart.rs:71 (gap)`
- `gap::PrivatePrimitives`: `crates/metal2vulkan-runtime/src/render.rs:8174 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/restart.rs:72 (gap)`
- `gap::ProvokingVertex`: `crates/metal2vulkan-runtime/src/render/restart.rs:73 (gap)`