diff --git a/crates/metal2vulkan-runtime/src/degradation.rs b/crates/metal2vulkan-runtime/src/degradation.rs index 19a64682a..99bd1a7e9 100644 --- a/crates/metal2vulkan-runtime/src/degradation.rs +++ b/crates/metal2vulkan-runtime/src/degradation.rs @@ -1041,9 +1041,15 @@ degradations! { /// a format whose layout is not measured; `texture/heap.rs`): Metal lays the texture out /// without its compression metadata, and the runtime's image keeps it. OptimizedDepthStencilTexture = "optimized-depth-stencil-texture", Precision, - "the texture keeps its GPU-optimized layout: heap_texture_size_and_align answers \ - Metal's size for the texture with the property on, larger than Metal's with it off, \ - so a heap sized by Metal's answers holds fewer such textures"; + "the texture's image keeps the GPU-optimized layout Metal drops with the property \ + off, so its bytes in the heap are not Metal's layout of its texels (where they lie \ + instead, and what moving them costs, heap-texture-untiled-layout and \ + shadowed-texture name for the shapes they cover); heap_texture_size_and_align \ + answers Metal's own size and alignment for the descriptor wherever the runtime \ + models them, and the larger of the images' and Metal's for a texture whose images \ + need more bytes or a coarser alignment that no shadow of the heap's bytes holds it \ + to (a depth twin among them), where a heap sized by Metal's answers holds fewer \ + such textures"; /// A texture of an IOSurface plane of more than one row under 16 bytes a row /// (`Buffer::new_texture_with_iosurface_plane`, `linear_plan.rs`): Metal's GPU writes its /// rows 16 bytes apart and reads every row past the first as memory-dependent bytes diff --git a/crates/metal2vulkan-validation/runtime-sources.sha256 b/crates/metal2vulkan-validation/runtime-sources.sha256 index 64ba181ad..12020afbf 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -f371c2088667756adcce645a8d790b9cd97b20e15284049399792051b1d056cb +69a5fa57d46c7414bbca952809544d30783ec408663691bf7340cfd7b66e77f6 diff --git a/crates/metal2vulkan-validation/src/runtime_lane/heap_textures.rs b/crates/metal2vulkan-validation/src/runtime_lane/heap_textures.rs index f1fdde24d..069e2c8df 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/heap_textures.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/heap_textures.rs @@ -1123,11 +1123,11 @@ fn a_heap_depth_texture_without_optimized_contents_answers_metal_s_footprint() { /// rows rather than in Metal's tiles, announced `heap-texture-untiled-layout` beside this kind. /// /// What the heap **answers** is Metal's model for the descriptor as given: 448256 bytes, the same -/// as the 8-level row's, where the same shape with `allowGPUOptimizedContents` on answers 451200. -/// So on this shape the kind's declared cost -- that -/// `heap_texture_size_and_align` answers Metal's size for the texture with the property on, larger -/// than Metal's with it off -- does not hold, and the three sizes are asserted so that it cannot be -/// read into the test. Narrowing the kind, or its cost, belongs to the declaration and not here. +/// as the 8-level row's, where the same shape with `allowGPUOptimizedContents` on answers 451200, +/// the larger of the two. All three are asserted, so the row holds the kind's cost to what it +/// says: the answer is Metal's own for the descriptor, not the property-on texture's. What the +/// heap's bytes lose instead is the layout, which `heap-texture-untiled-layout` and +/// `shadowed-texture` carry. /// /// Three controls bind that reason, each the announcing shape with one thing changed: **8 levels**, /// 16 moves and the most the shape holds, announces nothing; a one-aspect `Depth32Float` texture of @@ -1209,7 +1209,7 @@ fn a_heap_two_aspect_texture_of_more_levels_than_the_moves_hold_keeps_its_optimi assert_eq!(eight_counts, [0, 0, 0], "8 levels announced"); assert_eq!(depth_counts, [0, 0, 0], "one aspect of 9 levels announced"); assert_eq!(with_counts, [0, 0, 0], "the property on announced"); - // The answer is the property-off model, not the property-on one the cost names. + // Metal's model for the descriptor as given, not the property-on texture's. assert_eq!((nine.size, nine.align), (448256, 128)); assert_eq!(eight, nine, "8 levels answered another chain than 9"); assert_eq!((with.size, with.align), (451200, 128)); diff --git a/docs/API.md b/docs/API.md index 237fd7acf..7a534cd98 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1763,9 +1763,14 @@ fast forms record, and each `PrecisionNote`'s rustdoc states its bound. whose driver keeps depth and stencil images GPU-optimized whatever their create info, that no shadow of Metal's tiles in the heap's bytes serves (a multisample texture, a depth twin, a format whose layout is not measured): Metal lays the texture out without its compression metadata, and - the runtime's image keeps it. Cost: the texture keeps its GPU-optimized layout: - heap_texture_size_and_align answers Metal's size for the texture with the property on, larger - than Metal's with it off, so a heap sized by Metal's answers holds fewer such textures. + the runtime's image keeps it. Cost: the texture's image keeps the GPU-optimized layout Metal + drops with the property off, so its bytes in the heap are not Metal's layout of its texels (where + they lie instead, and what moving them costs, heap-texture-untiled-layout and shadowed-texture + name for the shapes they cover); heap_texture_size_and_align answers Metal's own size and + alignment for the descriptor wherever the runtime models them, and the larger of the images' and + Metal's for a texture whose images need more bytes or a coarser alignment that no shadow of the + heap's bytes holds it to (a depth twin among them), where a heap sized by Metal's answers holds + fewer such textures. - `metal2vulkan-degrade-narrow-surface-rows` (precision). `NarrowSurfaceRows`: A texture of an IOSurface plane of more than one row under 16 bytes a row: Metal's GPU writes its rows 16 bytes apart and reads every row past the first as memory-dependent bytes (zeros in a fresh process;